#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AiInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub pic_url: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for AiInfo {
const NAME: &'static str = "AiInfo";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.AiInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.AiInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Announcement {
#[prost(bool, tag = "1")]
pub enable: bool,
#[prost(string, tag = "2")]
pub content: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub jump_enable: bool,
#[prost(string, tag = "4")]
pub jump_url: ::prost::alloc::string::String,
}
impl ::prost::Name for Announcement {
const NAME: &'static str = "Announcement";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.Announcement".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.Announcement".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CloseConversationReq {
#[prost(int64, tag = "1")]
pub shop_id: i64,
#[prost(int64, tag = "2")]
pub shop_father_id: i64,
#[prost(int64, tag = "3")]
pub custom_session_id: i64,
#[prost(enumeration = "close_conversation_req::CloseConversationSource", tag = "4")]
pub source: i32,
#[prost(int32, tag = "5")]
pub msg_source: i32,
#[prost(int32, tag = "6")]
pub situation: i32,
}
pub mod close_conversation_req {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CloseConversationSource {
Default = 0,
InputBox = 1,
Back = 2,
}
impl CloseConversationSource {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "CLOSE_CONVERSATION_SOURCE_DEFAULT",
Self::InputBox => "CLOSE_CONVERSATION_SOURCE_INPUT_BOX",
Self::Back => "CLOSE_CONVERSATION_SOURCE_BACK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CLOSE_CONVERSATION_SOURCE_DEFAULT" => Some(Self::Default),
"CLOSE_CONVERSATION_SOURCE_INPUT_BOX" => Some(Self::InputBox),
"CLOSE_CONVERSATION_SOURCE_BACK" => Some(Self::Back),
_ => None,
}
}
}
}
impl ::prost::Name for CloseConversationReq {
const NAME: &'static str = "CloseConversationReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.CloseConversationReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.CloseConversationReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseConversationRsp {
#[prost(string, tag = "1")]
pub evaluation_url: ::prost::alloc::string::String,
}
impl ::prost::Name for CloseConversationRsp {
const NAME: &'static str = "CloseConversationRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.CloseConversationRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.CloseConversationRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
impl ::prost::Name for Empty {
const NAME: &'static str = "Empty";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.Empty".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.Empty".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FinishParagraphsRenderReq {
#[prost(int64, tag = "1")]
pub msg_key: i64,
#[prost(int64, tag = "2")]
pub status: i64,
#[prost(message, optional, tag = "3")]
pub stop_pos: ::core::option::Option<FinishParagraphsRenderStopPos>,
}
impl ::prost::Name for FinishParagraphsRenderReq {
const NAME: &'static str = "FinishParagraphsRenderReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.FinishParagraphsRenderReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.FinishParagraphsRenderReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FinishParagraphsRenderRsp {}
impl ::prost::Name for FinishParagraphsRenderRsp {
const NAME: &'static str = "FinishParagraphsRenderRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.FinishParagraphsRenderRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.FinishParagraphsRenderRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FinishParagraphsRenderStopPos {
#[prost(int64, tag = "1")]
pub para: i64,
#[prost(int64, tag = "2")]
pub node: i64,
}
impl ::prost::Name for FinishParagraphsRenderStopPos {
const NAME: &'static str = "FinishParagraphsRenderStopPos";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.FinishParagraphsRenderStopPos".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.FinishParagraphsRenderStopPos".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNewSessionsReq {
#[prost(int64, tag = "1")]
pub begin_ts: i64,
#[prost(int32, tag = "2")]
pub size: i32,
#[prost(int64, tag = "3")]
pub recv_uid: i64,
}
impl ::prost::Name for GetNewSessionsReq {
const NAME: &'static str = "GetNewSessionsReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.GetNewSessionsReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.GetNewSessionsReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessDetailReq {
#[prost(message, repeated, tag = "1")]
pub shop: ::prost::alloc::vec::Vec<Shop>,
#[prost(int64, tag = "2")]
pub group_id: i64,
}
impl ::prost::Name for GetSessDetailReq {
const NAME: &'static str = "GetSessDetailReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.GetSessDetailReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.GetSessDetailReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessDetailRsp {
#[prost(message, repeated, tag = "1")]
pub session_list: ::prost::alloc::vec::Vec<super::model::SessionInfo>,
}
impl ::prost::Name for GetSessDetailRsp {
const NAME: &'static str = "GetSessDetailRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.GetSessDetailRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.GetSessDetailRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetSessionsReq {
#[prost(int64, tag = "1")]
pub begin_ts: i64,
#[prost(int64, tag = "2")]
pub end_ts: i64,
#[prost(int32, tag = "3")]
pub size: i32,
}
impl ::prost::Name for GetSessionsReq {
const NAME: &'static str = "GetSessionsReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.GetSessionsReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.GetSessionsReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetUserSettingsReq {
#[prost(int64, tag = "1")]
pub shop_father_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
}
impl ::prost::Name for GetUserSettingsReq {
const NAME: &'static str = "GetUserSettingsReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.GetUserSettingsReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.GetUserSettingsReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserSettingsRsp {
#[prost(bool, tag = "1")]
pub enable_initiative_msg: bool,
#[prost(bool, tag = "2")]
pub do_not_disturb: bool,
#[prost(string, tag = "3")]
pub report_url: ::prost::alloc::string::String,
}
impl ::prost::Name for GetUserSettingsRsp {
const NAME: &'static str = "GetUserSettingsRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.GetUserSettingsRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.GetUserSettingsRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OutCustomerQueueReq {
#[prost(int64, tag = "1")]
pub shop_father_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
#[prost(int64, tag = "3")]
pub msg_key: i64,
}
impl ::prost::Name for OutCustomerQueueReq {
const NAME: &'static str = "OutCustomerQueueReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.OutCustomerQueueReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.OutCustomerQueueReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PopResultUpdateReq {
#[prost(enumeration = "super::model::ComplianceAlertType", tag = "1")]
pub pop_field: i32,
#[prost(bool, tag = "2")]
pub is_allow: bool,
}
impl ::prost::Name for PopResultUpdateReq {
const NAME: &'static str = "PopResultUpdateReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.PopResultUpdateReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.PopResultUpdateReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PopResultUpdateRsp {
#[prost(string, tag = "1")]
pub msg: ::prost::alloc::string::String,
}
impl ::prost::Name for PopResultUpdateRsp {
const NAME: &'static str = "PopResultUpdateRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.PopResultUpdateRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.PopResultUpdateRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PreEvaluateReq {
#[prost(enumeration = "super::model::EvaluateType", tag = "1")]
pub r#type: i32,
#[prost(int64, tag = "2")]
pub shop_father_id: i64,
#[prost(int64, tag = "3")]
pub shop_id: i64,
#[prost(int64, tag = "4")]
pub msg_key: i64,
#[prost(int64, tag = "5")]
pub custom_session_id: i64,
#[prost(int64, tag = "6")]
pub machine_session_id: i64,
}
impl ::prost::Name for PreEvaluateReq {
const NAME: &'static str = "PreEvaluateReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.PreEvaluateReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.PreEvaluateReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreEvaluateRsp {
#[prost(message, optional, tag = "1")]
pub rsp: ::core::option::Option<super::model::EvaluationShowInfo>,
#[prost(message, optional, tag = "2")]
pub rsp_v2: ::core::option::Option<super::model::EvaluationShowInfoV2>,
}
impl ::prost::Name for PreEvaluateRsp {
const NAME: &'static str = "PreEvaluateRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.PreEvaluateRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.PreEvaluateRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RemoveSessionReq {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
#[prost(int64, tag = "3")]
pub shop_father_id: i64,
#[prost(int32, tag = "4")]
pub session_type: i32,
}
impl ::prost::Name for RemoveSessionReq {
const NAME: &'static str = "RemoveSessionReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.RemoveSessionReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.RemoveSessionReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SendHeartBeatReq {
#[prost(int64, tag = "1")]
pub shop_id: i64,
#[prost(int64, tag = "2")]
pub shop_father_id: i64,
}
impl ::prost::Name for SendHeartBeatReq {
const NAME: &'static str = "SendHeartBeatReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SendHeartBeatReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SendHeartBeatReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendMsgExt {
#[prost(int64, tag = "1")]
pub source_up: i64,
#[prost(string, tag = "2")]
pub source_bvid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cm_from_track_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub from_spmid: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub client_token: ::prost::alloc::string::String,
}
impl ::prost::Name for SendMsgExt {
const NAME: &'static str = "SendMsgExt";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SendMsgExt".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SendMsgExt".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendMsgReq {
#[prost(message, optional, tag = "1")]
pub msg: ::core::option::Option<super::model::Msg>,
#[prost(int64, tag = "2")]
pub skill_group_id: i64,
#[prost(message, optional, tag = "3")]
pub ext: ::core::option::Option<SendMsgExt>,
}
impl ::prost::Name for SendMsgReq {
const NAME: &'static str = "SendMsgReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SendMsgReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SendMsgReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendMsgRsp {
#[prost(int64, tag = "1")]
pub msg_key: i64,
#[prost(string, tag = "2")]
pub msg_content: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub e_infos: ::prost::alloc::vec::Vec<super::model::EmotionInfo>,
#[prost(message, optional, tag = "4")]
pub ai_info: ::core::option::Option<AiInfo>,
}
impl ::prost::Name for SendMsgRsp {
const NAME: &'static str = "SendMsgRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SendMsgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SendMsgRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionMsgReq {
#[prost(int64, tag = "1")]
pub shop_father_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
#[prost(int64, tag = "3")]
pub begin_seqno: i64,
#[prost(int64, tag = "4")]
pub end_seqno: i64,
#[prost(int32, tag = "5")]
pub size: i32,
#[prost(int32, tag = "6")]
pub order: i32,
#[prost(string, tag = "7")]
pub dev_id: ::prost::alloc::string::String,
#[prost(int32, tag = "8")]
pub situation: i32,
#[prost(int32, tag = "9")]
pub gid: i32,
#[prost(message, optional, tag = "10")]
pub ext: ::core::option::Option<SessionMsgReqExt>,
}
impl ::prost::Name for SessionMsgReq {
const NAME: &'static str = "SessionMsgReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SessionMsgReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SessionMsgReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionMsgReqExt {
#[prost(int64, tag = "1")]
pub source_up: i64,
#[prost(string, tag = "2")]
pub source_bvid: ::prost::alloc::string::String,
}
impl ::prost::Name for SessionMsgReqExt {
const NAME: &'static str = "SessionMsgReqExt";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SessionMsgReqExt".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SessionMsgReqExt".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionMsgRsp {
#[prost(message, repeated, tag = "1")]
pub messages: ::prost::alloc::vec::Vec<super::model::Msg>,
#[prost(int32, tag = "2")]
pub has_more: i32,
#[prost(int64, tag = "3")]
pub min_seqno: i64,
#[prost(int64, tag = "4")]
pub max_seqno: i64,
#[prost(message, repeated, tag = "5")]
pub e_infos: ::prost::alloc::vec::Vec<super::model::EmotionInfo>,
#[prost(int32, tag = "6")]
pub fetch_interval: i32,
#[prost(message, optional, tag = "7")]
pub hot_update_session_info: ::core::option::Option<
super::model::HotUpdateSessionInfo,
>,
}
impl ::prost::Name for SessionMsgRsp {
const NAME: &'static str = "SessionMsgRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SessionMsgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SessionMsgRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionsRsp {
#[prost(message, repeated, tag = "1")]
pub session_list: ::prost::alloc::vec::Vec<super::model::SessionInfo>,
#[prost(int32, tag = "2")]
pub has_more: i32,
}
impl ::prost::Name for SessionsRsp {
const NAME: &'static str = "SessionsRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SessionsRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SessionsRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetTopReq {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
#[prost(int64, tag = "3")]
pub shop_father_id: i64,
#[prost(int32, tag = "4")]
pub session_type: i32,
}
impl ::prost::Name for SetTopReq {
const NAME: &'static str = "SetTopReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SetTopReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SetTopReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetUserSettingsReq {
#[prost(int64, tag = "1")]
pub shop_father_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
#[prost(bool, tag = "3")]
pub enable_initiative_msg: bool,
#[prost(bool, tag = "4")]
pub do_not_disturb: bool,
}
impl ::prost::Name for SetUserSettingsReq {
const NAME: &'static str = "SetUserSettingsReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SetUserSettingsReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SetUserSettingsReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetUserSettingsRsp {
#[prost(string, tag = "1")]
pub msg: ::prost::alloc::string::String,
}
impl ::prost::Name for SetUserSettingsRsp {
const NAME: &'static str = "SetUserSettingsRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.SetUserSettingsRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.SetUserSettingsRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Shop {
#[prost(int64, tag = "1")]
pub shop_father_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
}
impl ::prost::Name for Shop {
const NAME: &'static str = "Shop";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.Shop".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.Shop".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ShopCfgReq {
#[prost(int64, tag = "1")]
pub shop_id: i64,
#[prost(int64, tag = "2")]
pub shop_father_id: i64,
}
impl ::prost::Name for ShopCfgReq {
const NAME: &'static str = "ShopCfgReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.ShopCfgReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.ShopCfgReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShopCfgRsp {
#[prost(message, optional, tag = "1")]
pub announcement: ::core::option::Option<Announcement>,
}
impl ::prost::Name for ShopCfgRsp {
const NAME: &'static str = "ShopCfgRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.ShopCfgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.ShopCfgRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ShopInfoReq {
#[prost(int64, tag = "1")]
pub shop_id: i64,
#[prost(int64, tag = "2")]
pub shop_father_id: i64,
}
impl ::prost::Name for ShopInfoReq {
const NAME: &'static str = "ShopInfoReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.ShopInfoReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.ShopInfoReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShopInfoRsp {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub face: ::prost::alloc::string::String,
}
impl ::prost::Name for ShopInfoRsp {
const NAME: &'static str = "ShopInfoRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.ShopInfoRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.ShopInfoRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateAckReq {
#[prost(int64, tag = "1")]
pub shop_father_id: i64,
#[prost(int64, tag = "2")]
pub shop_id: i64,
}
impl ::prost::Name for UpdateAckReq {
const NAME: &'static str = "UpdateAckReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.UpdateAckReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.UpdateAckReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WindowOptionsReq {
#[prost(int64, tag = "2")]
pub shop_father_id: i64,
#[prost(int64, tag = "3")]
pub shop_id: i64,
#[prost(int32, tag = "4")]
pub situation: i32,
#[prost(int32, tag = "5")]
pub msg_source: i32,
}
impl ::prost::Name for WindowOptionsReq {
const NAME: &'static str = "WindowOptionsReq";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.WindowOptionsReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.WindowOptionsReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WindowOptionsRsp {
#[prost(message, optional, tag = "1")]
pub goods: ::core::option::Option<super::model::WindowOptionGoods>,
#[prost(message, optional, tag = "2")]
pub order: ::core::option::Option<super::model::WindowOptionOrder>,
#[prost(message, optional, tag = "3")]
pub evaluation: ::core::option::Option<super::model::WindowOptionEvaluation>,
#[prost(message, optional, tag = "4")]
pub message: ::core::option::Option<super::model::WindowOptionMessage>,
#[prost(message, optional, tag = "5")]
pub history: ::core::option::Option<super::model::WindowOptionHistory>,
}
impl ::prost::Name for WindowOptionsRsp {
const NAME: &'static str = "WindowOptionsRsp";
const PACKAGE: &'static str = "bilibili.im.customer.interfaces";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.customer.interfaces.WindowOptionsRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.customer.interfaces.WindowOptionsRsp".into()
}
}
#[cfg(feature = "feat-enable-generated-client")]
pub mod customer_interface_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct CustomerInterfaceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerInterfaceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerInterfaceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
CustomerInterfaceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn close_conversation(
&mut self,
request: impl tonic::IntoRequest<super::CloseConversationReq>,
) -> std::result::Result<
tonic::Response<super::CloseConversationRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/CloseConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"CloseConversation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn customer_pre_evaluate(
&mut self,
request: impl tonic::IntoRequest<super::PreEvaluateReq>,
) -> std::result::Result<tonic::Response<super::PreEvaluateRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/CustomerPreEvaluate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"CustomerPreEvaluate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn customer_update_ack(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAckReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/CustomerUpdateAck",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"CustomerUpdateAck",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn customer_window_options(
&mut self,
request: impl tonic::IntoRequest<super::WindowOptionsReq>,
) -> std::result::Result<
tonic::Response<super::WindowOptionsRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/CustomerWindowOptions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"CustomerWindowOptions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn finish_paragraphs_render(
&mut self,
request: impl tonic::IntoRequest<super::FinishParagraphsRenderReq>,
) -> std::result::Result<
tonic::Response<super::FinishParagraphsRenderRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/FinishParagraphsRender",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"FinishParagraphsRender",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_customer_sess_detail(
&mut self,
request: impl tonic::IntoRequest<super::GetSessDetailReq>,
) -> std::result::Result<
tonic::Response<super::GetSessDetailRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessDetail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"GetCustomerSessDetail",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_customer_sessions(
&mut self,
request: impl tonic::IntoRequest<super::GetSessionsReq>,
) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"GetCustomerSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_new_customer_sessions(
&mut self,
request: impl tonic::IntoRequest<super::GetNewSessionsReq>,
) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/GetNewCustomerSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"GetNewCustomerSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_shop_cfg(
&mut self,
request: impl tonic::IntoRequest<super::ShopCfgReq>,
) -> std::result::Result<tonic::Response<super::ShopCfgRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/GetShopCfg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"GetShopCfg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_shop_info(
&mut self,
request: impl tonic::IntoRequest<super::ShopInfoReq>,
) -> std::result::Result<tonic::Response<super::ShopInfoRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/GetShopInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"GetShopInfo",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_user_settings(
&mut self,
request: impl tonic::IntoRequest<super::GetUserSettingsReq>,
) -> std::result::Result<
tonic::Response<super::GetUserSettingsRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/GetUserSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"GetUserSettings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn heart_beat(
&mut self,
request: impl tonic::IntoRequest<super::SendHeartBeatReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/HeartBeat",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"HeartBeat",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn out_customer_queue(
&mut self,
request: impl tonic::IntoRequest<super::OutCustomerQueueReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/OutCustomerQueue",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"OutCustomerQueue",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn pop_result_update(
&mut self,
request: impl tonic::IntoRequest<super::PopResultUpdateReq>,
) -> std::result::Result<
tonic::Response<super::PopResultUpdateRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/PopResultUpdate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"PopResultUpdate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_session(
&mut self,
request: impl tonic::IntoRequest<super::RemoveSessionReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/RemoveSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"RemoveSession",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn send_customer_msg(
&mut self,
request: impl tonic::IntoRequest<super::SendMsgReq>,
) -> std::result::Result<tonic::Response<super::SendMsgRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/SendCustomerMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"SendCustomerMsg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_top(
&mut self,
request: impl tonic::IntoRequest<super::SetTopReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/SetTop",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"SetTop",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_user_settings(
&mut self,
request: impl tonic::IntoRequest<super::SetUserSettingsReq>,
) -> std::result::Result<
tonic::Response<super::SetUserSettingsRsp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/SetUserSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"SetUserSettings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn sync_fetch_customer_session_msgs(
&mut self,
request: impl tonic::IntoRequest<super::SessionMsgReq>,
) -> std::result::Result<tonic::Response<super::SessionMsgRsp>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/bilibili.im.customer.interfaces.CustomerInterface/SyncFetchCustomerSessionMsgs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.customer.interfaces.CustomerInterface",
"SyncFetchCustomerSessionMsgs",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "feat-enable-generated-server")]
pub mod customer_interface_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait CustomerInterface: std::marker::Send + std::marker::Sync + 'static {
async fn close_conversation(
&self,
request: tonic::Request<super::CloseConversationReq>,
) -> std::result::Result<
tonic::Response<super::CloseConversationRsp>,
tonic::Status,
>;
async fn customer_pre_evaluate(
&self,
request: tonic::Request<super::PreEvaluateReq>,
) -> std::result::Result<tonic::Response<super::PreEvaluateRsp>, tonic::Status>;
async fn customer_update_ack(
&self,
request: tonic::Request<super::UpdateAckReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
async fn customer_window_options(
&self,
request: tonic::Request<super::WindowOptionsReq>,
) -> std::result::Result<
tonic::Response<super::WindowOptionsRsp>,
tonic::Status,
>;
async fn finish_paragraphs_render(
&self,
request: tonic::Request<super::FinishParagraphsRenderReq>,
) -> std::result::Result<
tonic::Response<super::FinishParagraphsRenderRsp>,
tonic::Status,
>;
async fn get_customer_sess_detail(
&self,
request: tonic::Request<super::GetSessDetailReq>,
) -> std::result::Result<
tonic::Response<super::GetSessDetailRsp>,
tonic::Status,
>;
async fn get_customer_sessions(
&self,
request: tonic::Request<super::GetSessionsReq>,
) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status>;
async fn get_new_customer_sessions(
&self,
request: tonic::Request<super::GetNewSessionsReq>,
) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status>;
async fn get_shop_cfg(
&self,
request: tonic::Request<super::ShopCfgReq>,
) -> std::result::Result<tonic::Response<super::ShopCfgRsp>, tonic::Status>;
async fn get_shop_info(
&self,
request: tonic::Request<super::ShopInfoReq>,
) -> std::result::Result<tonic::Response<super::ShopInfoRsp>, tonic::Status>;
async fn get_user_settings(
&self,
request: tonic::Request<super::GetUserSettingsReq>,
) -> std::result::Result<
tonic::Response<super::GetUserSettingsRsp>,
tonic::Status,
>;
async fn heart_beat(
&self,
request: tonic::Request<super::SendHeartBeatReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
async fn out_customer_queue(
&self,
request: tonic::Request<super::OutCustomerQueueReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
async fn pop_result_update(
&self,
request: tonic::Request<super::PopResultUpdateReq>,
) -> std::result::Result<
tonic::Response<super::PopResultUpdateRsp>,
tonic::Status,
>;
async fn remove_session(
&self,
request: tonic::Request<super::RemoveSessionReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
async fn send_customer_msg(
&self,
request: tonic::Request<super::SendMsgReq>,
) -> std::result::Result<tonic::Response<super::SendMsgRsp>, tonic::Status>;
async fn set_top(
&self,
request: tonic::Request<super::SetTopReq>,
) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
async fn set_user_settings(
&self,
request: tonic::Request<super::SetUserSettingsReq>,
) -> std::result::Result<
tonic::Response<super::SetUserSettingsRsp>,
tonic::Status,
>;
async fn sync_fetch_customer_session_msgs(
&self,
request: tonic::Request<super::SessionMsgReq>,
) -> std::result::Result<tonic::Response<super::SessionMsgRsp>, tonic::Status>;
}
#[derive(Debug)]
pub struct CustomerInterfaceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> CustomerInterfaceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for CustomerInterfaceServer<T>
where
T: CustomerInterface,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/bilibili.im.customer.interfaces.CustomerInterface/CloseConversation" => {
#[allow(non_camel_case_types)]
struct CloseConversationSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::CloseConversationReq>
for CloseConversationSvc<T> {
type Response = super::CloseConversationRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CloseConversationReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::close_conversation(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CloseConversationSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/CustomerPreEvaluate" => {
#[allow(non_camel_case_types)]
struct CustomerPreEvaluateSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::PreEvaluateReq>
for CustomerPreEvaluateSvc<T> {
type Response = super::PreEvaluateRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::PreEvaluateReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::customer_pre_evaluate(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CustomerPreEvaluateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/CustomerUpdateAck" => {
#[allow(non_camel_case_types)]
struct CustomerUpdateAckSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::UpdateAckReq>
for CustomerUpdateAckSvc<T> {
type Response = super::Empty;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpdateAckReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::customer_update_ack(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CustomerUpdateAckSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/CustomerWindowOptions" => {
#[allow(non_camel_case_types)]
struct CustomerWindowOptionsSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::WindowOptionsReq>
for CustomerWindowOptionsSvc<T> {
type Response = super::WindowOptionsRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::WindowOptionsReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::customer_window_options(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CustomerWindowOptionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/FinishParagraphsRender" => {
#[allow(non_camel_case_types)]
struct FinishParagraphsRenderSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::FinishParagraphsRenderReq>
for FinishParagraphsRenderSvc<T> {
type Response = super::FinishParagraphsRenderRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::FinishParagraphsRenderReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::finish_paragraphs_render(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = FinishParagraphsRenderSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessDetail" => {
#[allow(non_camel_case_types)]
struct GetCustomerSessDetailSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::GetSessDetailReq>
for GetCustomerSessDetailSvc<T> {
type Response = super::GetSessDetailRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetSessDetailReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::get_customer_sess_detail(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetCustomerSessDetailSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessions" => {
#[allow(non_camel_case_types)]
struct GetCustomerSessionsSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::GetSessionsReq>
for GetCustomerSessionsSvc<T> {
type Response = super::SessionsRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetSessionsReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::get_customer_sessions(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetCustomerSessionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/GetNewCustomerSessions" => {
#[allow(non_camel_case_types)]
struct GetNewCustomerSessionsSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::GetNewSessionsReq>
for GetNewCustomerSessionsSvc<T> {
type Response = super::SessionsRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetNewSessionsReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::get_new_customer_sessions(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetNewCustomerSessionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/GetShopCfg" => {
#[allow(non_camel_case_types)]
struct GetShopCfgSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::ShopCfgReq>
for GetShopCfgSvc<T> {
type Response = super::ShopCfgRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ShopCfgReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::get_shop_cfg(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetShopCfgSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/GetShopInfo" => {
#[allow(non_camel_case_types)]
struct GetShopInfoSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::ShopInfoReq>
for GetShopInfoSvc<T> {
type Response = super::ShopInfoRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ShopInfoReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::get_shop_info(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetShopInfoSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/GetUserSettings" => {
#[allow(non_camel_case_types)]
struct GetUserSettingsSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::GetUserSettingsReq>
for GetUserSettingsSvc<T> {
type Response = super::GetUserSettingsRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetUserSettingsReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::get_user_settings(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetUserSettingsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/HeartBeat" => {
#[allow(non_camel_case_types)]
struct HeartBeatSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::SendHeartBeatReq>
for HeartBeatSvc<T> {
type Response = super::Empty;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SendHeartBeatReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::heart_beat(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = HeartBeatSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/OutCustomerQueue" => {
#[allow(non_camel_case_types)]
struct OutCustomerQueueSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::OutCustomerQueueReq>
for OutCustomerQueueSvc<T> {
type Response = super::Empty;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::OutCustomerQueueReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::out_customer_queue(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = OutCustomerQueueSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/PopResultUpdate" => {
#[allow(non_camel_case_types)]
struct PopResultUpdateSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::PopResultUpdateReq>
for PopResultUpdateSvc<T> {
type Response = super::PopResultUpdateRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::PopResultUpdateReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::pop_result_update(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = PopResultUpdateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/RemoveSession" => {
#[allow(non_camel_case_types)]
struct RemoveSessionSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::RemoveSessionReq>
for RemoveSessionSvc<T> {
type Response = super::Empty;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RemoveSessionReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::remove_session(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RemoveSessionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/SendCustomerMsg" => {
#[allow(non_camel_case_types)]
struct SendCustomerMsgSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::SendMsgReq>
for SendCustomerMsgSvc<T> {
type Response = super::SendMsgRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SendMsgReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::send_customer_msg(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SendCustomerMsgSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/SetTop" => {
#[allow(non_camel_case_types)]
struct SetTopSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::SetTopReq> for SetTopSvc<T> {
type Response = super::Empty;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetTopReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::set_top(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SetTopSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/SetUserSettings" => {
#[allow(non_camel_case_types)]
struct SetUserSettingsSvc<T: CustomerInterface>(pub Arc<T>);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::SetUserSettingsReq>
for SetUserSettingsSvc<T> {
type Response = super::SetUserSettingsRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetUserSettingsReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::set_user_settings(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SetUserSettingsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/bilibili.im.customer.interfaces.CustomerInterface/SyncFetchCustomerSessionMsgs" => {
#[allow(non_camel_case_types)]
struct SyncFetchCustomerSessionMsgsSvc<T: CustomerInterface>(
pub Arc<T>,
);
impl<
T: CustomerInterface,
> tonic::server::UnaryService<super::SessionMsgReq>
for SyncFetchCustomerSessionMsgsSvc<T> {
type Response = super::SessionMsgRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SessionMsgReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CustomerInterface>::sync_fetch_customer_session_msgs(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SyncFetchCustomerSessionMsgsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for CustomerInterfaceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "bilibili.im.customer.interfaces.CustomerInterface";
impl<T> tonic::server::NamedService for CustomerInterfaceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}