#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DummyReq {
#[prost(int32, tag = "1")]
pub idl: i32,
}
impl ::prost::Name for DummyReq {
const NAME: &'static str = "DummyReq";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.DummyReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.DummyReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DummyRsp {}
impl ::prost::Name for DummyRsp {
const NAME: &'static str = "DummyRsp";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.DummyRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.DummyRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmotionInfo {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub size: i32,
#[prost(string, tag = "4")]
pub gif_url: ::prost::alloc::string::String,
}
impl ::prost::Name for EmotionInfo {
const NAME: &'static str = "EmotionInfo";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.EmotionInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.EmotionInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserCosmoStateReq {
#[prost(string, tag = "1")]
pub business: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub card_send_mid: i64,
}
impl ::prost::Name for GetUserCosmoStateReq {
const NAME: &'static str = "GetUserCosmoStateReq";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.GetUserCosmoStateReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.GetUserCosmoStateReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserCosmoStateRsp {
#[prost(string, tag = "1")]
pub business: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub card_send_mid: i64,
#[prost(int32, tag = "3")]
pub cosmo_state: i32,
#[prost(int32, tag = "4")]
pub op_type: i32,
#[prost(string, tag = "5")]
pub text: ::prost::alloc::string::String,
}
impl ::prost::Name for GetUserCosmoStateRsp {
const NAME: &'static str = "GetUserCosmoStateRsp";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.GetUserCosmoStateRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.GetUserCosmoStateRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HasLikeState {
#[prost(enumeration = "MsgLikeState", tag = "1")]
pub state: i32,
}
impl ::prost::Name for HasLikeState {
const NAME: &'static str = "HasLikeState";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.HasLikeState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.HasLikeState".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgDetail {
#[prost(int64, tag = "1")]
pub msg_key: i64,
#[prost(int64, tag = "2")]
pub seqno: i64,
}
impl ::prost::Name for MsgDetail {
const NAME: &'static str = "MsgDetail";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.MsgDetail".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.MsgDetail".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFeedUnreadRsp {
#[prost(map = "string, int64", tag = "1")]
pub unread: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
}
impl ::prost::Name for MsgFeedUnreadRsp {
const NAME: &'static str = "MsgFeedUnreadRsp";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.MsgFeedUnreadRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.MsgFeedUnreadRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NewTotalUnread {
#[prost(int32, tag = "1")]
pub unread_count: i32,
#[prost(int32, tag = "2")]
pub unread_type: i32,
}
impl ::prost::Name for NewTotalUnread {
const NAME: &'static str = "NewTotalUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.NewTotalUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.NewTotalUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqAckAssisMsg {
#[prost(int64, tag = "1")]
pub ack_seqno: i64,
}
impl ::prost::Name for ReqAckAssisMsg {
const NAME: &'static str = "ReqAckAssisMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqAckAssisMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqAckAssisMsg".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqAckSessions {
#[prost(int64, tag = "1")]
pub begin_ts: i64,
#[prost(int32, tag = "2")]
pub end_ts: i32,
#[prost(int32, tag = "3")]
pub size: i32,
}
impl ::prost::Name for ReqAckSessions {
const NAME: &'static str = "ReqAckSessions";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqAckSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqAckSessions".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqBatRmSess {}
impl ::prost::Name for ReqBatRmSess {
const NAME: &'static str = "ReqBatRmSess";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqBatRmSess".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqBatRmSess".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqCloseClearUnreadUi {}
impl ::prost::Name for ReqCloseClearUnreadUi {
const NAME: &'static str = "ReqCloseClearUnreadUI";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqCloseClearUnreadUI".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqCloseClearUnreadUI".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqGetDiscussListInImPage {}
impl ::prost::Name for ReqGetDiscussListInImPage {
const NAME: &'static str = "ReqGetDiscussListInImPage";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqGetDiscussListInImPage".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqGetDiscussListInImPage".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqGetMsg {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
#[prost(message, repeated, tag = "3")]
pub msg_detail: ::prost::alloc::vec::Vec<MsgDetail>,
}
impl ::prost::Name for ReqGetMsg {
const NAME: &'static str = "ReqGetMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqGetMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqGetMsg".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqGetSessions {
#[prost(int64, tag = "1")]
pub begin_ts: i64,
#[prost(int64, tag = "2")]
pub end_ts: i64,
#[prost(int32, tag = "3")]
pub size: i32,
#[prost(int32, tag = "4")]
pub session_type: i32,
#[prost(int32, tag = "5")]
pub unfollow_fold: i32,
#[prost(int32, tag = "6")]
pub group_fold: i32,
#[prost(int32, tag = "7")]
pub sort_rule: i32,
#[prost(int32, tag = "8")]
pub teenager_mode: i32,
#[prost(int32, tag = "9")]
pub lessons_mode: i32,
#[prost(int32, repeated, tag = "10")]
pub sids: ::prost::alloc::vec::Vec<i32>,
#[prost(int64, tag = "11")]
pub ai_uid: i64,
}
impl ::prost::Name for ReqGetSessions {
const NAME: &'static str = "ReqGetSessions";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqGetSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqGetSessions".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqGetSpecificSessions {
#[prost(message, repeated, tag = "1")]
pub talker_sessions: ::prost::alloc::vec::Vec<SimpleSession>,
}
impl ::prost::Name for ReqGetSpecificSessions {
const NAME: &'static str = "ReqGetSpecificSessions";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqGetSpecificSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqGetSpecificSessions".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqGroupAssisMsg {
#[prost(int64, tag = "1")]
pub client_seqno: i64,
#[prost(int32, tag = "2")]
pub size: i32,
}
impl ::prost::Name for ReqGroupAssisMsg {
const NAME: &'static str = "ReqGroupAssisMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqGroupAssisMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqGroupAssisMsg".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqLikeMsg {
#[prost(int64, tag = "1")]
pub msg_key: i64,
#[prost(enumeration = "MsgLikeAction", tag = "2")]
pub action: i32,
}
impl ::prost::Name for ReqLikeMsg {
const NAME: &'static str = "ReqLikeMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqLikeMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqLikeMsg".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqLiveInfo {
#[prost(int64, tag = "1")]
pub uid: i64,
#[prost(int64, tag = "2")]
pub talker_id: i64,
}
impl ::prost::Name for ReqLiveInfo {
const NAME: &'static str = "ReqLiveInfo";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqLiveInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqLiveInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqMsgHasLike {
#[prost(int64, repeated, tag = "1")]
pub msg_keys: ::prost::alloc::vec::Vec<i64>,
}
impl ::prost::Name for ReqMsgHasLike {
const NAME: &'static str = "ReqMsgHasLike";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqMsgHasLike".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqMsgHasLike".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqNewSessions {
#[prost(int64, tag = "1")]
pub begin_ts: i64,
#[prost(int32, tag = "2")]
pub size: i32,
#[prost(int32, tag = "3")]
pub teenager_mode: i32,
#[prost(int32, tag = "4")]
pub lessons_mode: i32,
#[prost(int32, repeated, tag = "5")]
pub sids: ::prost::alloc::vec::Vec<i32>,
}
impl ::prost::Name for ReqNewSessions {
const NAME: &'static str = "ReqNewSessions";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqNewSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqNewSessions".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqRelationSync {
#[prost(int64, tag = "1")]
pub client_relation_oplog_seqno: i64,
}
impl ::prost::Name for ReqRelationSync {
const NAME: &'static str = "ReqRelationSync";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqRelationSync".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqRelationSync".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqRemoveSession {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
#[prost(int64, tag = "3")]
pub shop_id: i64,
#[prost(int64, tag = "4")]
pub shop_father_id: i64,
}
impl ::prost::Name for ReqRemoveSession {
const NAME: &'static str = "ReqRemoveSession";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqRemoveSession".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqRemoveSession".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqSendMsg {
#[prost(message, optional, tag = "1")]
pub msg: ::core::option::Option<super::super::r#type::Msg>,
#[prost(string, tag = "2")]
pub cookie: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cookie2: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub error_code: i32,
#[prost(string, tag = "5")]
pub dev_id: ::prost::alloc::string::String,
}
impl ::prost::Name for ReqSendMsg {
const NAME: &'static str = "ReqSendMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSendMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSendMsg".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqSessionDetail {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
#[prost(int64, tag = "3")]
pub uid: i64,
}
impl ::prost::Name for ReqSessionDetail {
const NAME: &'static str = "ReqSessionDetail";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSessionDetail".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSessionDetail".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqSessionDetails {
#[prost(message, repeated, tag = "1")]
pub sess_ids: ::prost::alloc::vec::Vec<ReqSessionDetail>,
}
impl ::prost::Name for ReqSessionDetails {
const NAME: &'static str = "ReqSessionDetails";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSessionDetails".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSessionDetails".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqSessionMsg {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
#[prost(int64, tag = "3")]
pub end_seqno: i64,
#[prost(int64, tag = "4")]
pub begin_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(string, tag = "8")]
pub canal_token: ::prost::alloc::string::String,
#[prost(int64, tag = "9")]
pub ai_uid: i64,
#[prost(bool, tag = "10")]
pub need_ai_msg: bool,
}
impl ::prost::Name for ReqSessionMsg {
const NAME: &'static str = "ReqSessionMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSessionMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSessionMsg".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqSetTop {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
#[prost(int32, tag = "3")]
pub op_type: i32,
#[prost(int64, tag = "4")]
pub shop_id: i64,
#[prost(int64, tag = "5")]
pub shop_father_id: i64,
}
impl ::prost::Name for ReqSetTop {
const NAME: &'static str = "ReqSetTop";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSetTop".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSetTop".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqShareList {
#[prost(int32, tag = "1")]
pub size: i32,
#[prost(int32, tag = "2")]
pub source: i32,
}
impl ::prost::Name for ReqShareList {
const NAME: &'static str = "ReqShareList";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqShareList".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqShareList".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqShowClearUnreadUi {
#[prost(int32, tag = "1")]
pub unread_type: i32,
#[prost(int32, tag = "2")]
pub show_unfollow_list: i32,
#[prost(int32, tag = "4")]
pub show_dustbin: i32,
}
impl ::prost::Name for ReqShowClearUnreadUi {
const NAME: &'static str = "ReqShowClearUnreadUI";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqShowClearUnreadUI".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqShowClearUnreadUI".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqSingleUnread {
#[prost(int32, tag = "1")]
pub unread_type: i32,
#[prost(int32, tag = "2")]
pub show_unfollow_list: i32,
#[prost(int64, tag = "3")]
pub uid: i64,
#[prost(int32, tag = "4")]
pub show_dustbin: i32,
}
impl ::prost::Name for ReqSingleUnread {
const NAME: &'static str = "ReqSingleUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSingleUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSingleUnread".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqSpecificSingleUnread {
#[prost(message, repeated, tag = "1")]
pub talker_sessions: ::prost::alloc::vec::Vec<SimpleSession>,
}
impl ::prost::Name for ReqSpecificSingleUnread {
const NAME: &'static str = "ReqSpecificSingleUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSpecificSingleUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSpecificSingleUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqSyncAck {
#[prost(int64, tag = "1")]
pub client_seqno: i64,
}
impl ::prost::Name for ReqSyncAck {
const NAME: &'static str = "ReqSyncAck";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqSyncAck".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqSyncAck".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqTotalUnread {
#[prost(int32, tag = "1")]
pub unread_type: i32,
#[prost(int32, tag = "2")]
pub show_unfollow_list: i32,
#[prost(int64, tag = "3")]
pub uid: i64,
#[prost(int32, tag = "4")]
pub show_dustbin: i32,
#[prost(int32, tag = "5")]
pub singleunread_on: i32,
#[prost(int32, tag = "6")]
pub msgfeed_on: i32,
#[prost(int32, tag = "7")]
pub sysup_on: i32,
}
impl ::prost::Name for ReqTotalUnread {
const NAME: &'static str = "ReqTotalUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqTotalUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqTotalUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqUpdateAck {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
#[prost(int64, tag = "3")]
pub ack_seqno: i64,
}
impl ::prost::Name for ReqUpdateAck {
const NAME: &'static str = "ReqUpdateAck";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqUpdateAck".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqUpdateAck".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqUpdateIntercept {
#[prost(int64, tag = "1")]
pub uid: i64,
#[prost(int64, tag = "2")]
pub talker_id: i64,
#[prost(int32, tag = "3")]
pub status: i32,
}
impl ::prost::Name for ReqUpdateIntercept {
const NAME: &'static str = "ReqUpdateIntercept";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqUpdateIntercept".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqUpdateIntercept".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqUpdateTotalUnread {
#[prost(enumeration = "UpdateUnreadScope", tag = "1")]
pub scope: i32,
}
impl ::prost::Name for ReqUpdateTotalUnread {
const NAME: &'static str = "ReqUpdateTotalUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ReqUpdateTotalUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ReqUpdateTotalUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RspCloseClearUnreadUi {}
impl ::prost::Name for RspCloseClearUnreadUi {
const NAME: &'static str = "RspCloseClearUnreadUI";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspCloseClearUnreadUI".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspCloseClearUnreadUI".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspGetDiscussListInImPage {
#[prost(message, repeated, tag = "1")]
pub discuss_list: ::prost::alloc::vec::Vec<SingleDiscussInImPage>,
}
impl ::prost::Name for RspGetDiscussListInImPage {
const NAME: &'static str = "RspGetDiscussListInImPage";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspGetDiscussListInImPage".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspGetDiscussListInImPage".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspGetMsg {
#[prost(message, repeated, tag = "1")]
pub msg: ::prost::alloc::vec::Vec<super::super::r#type::Msg>,
}
impl ::prost::Name for RspGetMsg {
const NAME: &'static str = "RspGetMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspGetMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspGetMsg".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspLiveInfo {
#[prost(int64, tag = "1")]
pub live_status: i64,
#[prost(string, tag = "2")]
pub jump_url: ::prost::alloc::string::String,
}
impl ::prost::Name for RspLiveInfo {
const NAME: &'static str = "RspLiveInfo";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspLiveInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspLiveInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspMsgHasLike {
#[prost(map = "int64, message", tag = "1")]
pub states: ::std::collections::HashMap<i64, HasLikeState>,
}
impl ::prost::Name for RspMsgHasLike {
const NAME: &'static str = "RspMsgHasLike";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspMsgHasLike".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspMsgHasLike".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RspMyGroupUnread {
#[prost(int32, tag = "1")]
pub unread_count: i32,
}
impl ::prost::Name for RspMyGroupUnread {
const NAME: &'static str = "RspMyGroupUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspMyGroupUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspMyGroupUnread".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspRelationSync {
#[prost(int32, tag = "1")]
pub full: i32,
#[prost(message, repeated, tag = "2")]
pub relation_logs: ::prost::alloc::vec::Vec<super::super::r#type::RelationLog>,
#[prost(message, repeated, tag = "3")]
pub friend_list: ::prost::alloc::vec::Vec<super::super::r#type::FriendRelation>,
#[prost(int64, tag = "4")]
pub server_relation_oplog_seqno: i64,
#[prost(message, repeated, tag = "5")]
pub group_list: ::prost::alloc::vec::Vec<super::super::r#type::GroupRelation>,
}
impl ::prost::Name for RspRelationSync {
const NAME: &'static str = "RspRelationSync";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspRelationSync".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspRelationSync".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspSendMsg {
#[prost(int64, tag = "1")]
pub msg_key: i64,
#[prost(message, repeated, tag = "2")]
pub e_infos: ::prost::alloc::vec::Vec<EmotionInfo>,
#[prost(string, tag = "3")]
pub msg_content: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub key_hit_infos: ::core::option::Option<super::super::r#type::KeyHitInfos>,
#[prost(message, optional, tag = "5")]
pub rich_text_msg_content: ::core::option::Option<
super::super::r#type::RichTextMsgContent,
>,
#[prost(int64, tag = "6")]
pub seqno: i64,
}
impl ::prost::Name for RspSendMsg {
const NAME: &'static str = "RspSendMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSendMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSendMsg".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspSessionDetails {
#[prost(message, repeated, tag = "1")]
pub sess_infos: ::prost::alloc::vec::Vec<super::super::r#type::SessionInfo>,
}
impl ::prost::Name for RspSessionDetails {
const NAME: &'static str = "RspSessionDetails";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSessionDetails".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSessionDetails".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspSessionMsg {
#[prost(message, repeated, tag = "1")]
pub messages: ::prost::alloc::vec::Vec<super::super::r#type::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<EmotionInfo>,
}
impl ::prost::Name for RspSessionMsg {
const NAME: &'static str = "RspSessionMsg";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSessionMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSessionMsg".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspSessions {
#[prost(message, repeated, tag = "1")]
pub session_list: ::prost::alloc::vec::Vec<super::super::r#type::SessionInfo>,
#[prost(int32, tag = "2")]
pub has_more: i32,
#[prost(bool, tag = "3")]
pub anti_disturb_cleaning: bool,
#[prost(int32, tag = "4")]
pub is_address_list_empty: i32,
#[prost(map = "int32, int64", tag = "5")]
pub system_msg: ::std::collections::HashMap<i32, i64>,
#[prost(bool, tag = "6")]
pub show_level: bool,
}
impl ::prost::Name for RspSessions {
const NAME: &'static str = "RspSessions";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSessions".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspShareList {
#[prost(message, repeated, tag = "1")]
pub session_list: ::prost::alloc::vec::Vec<ShareSessionInfo>,
#[prost(int32, tag = "2")]
pub is_address_list_empty: i32,
}
impl ::prost::Name for RspShareList {
const NAME: &'static str = "RspShareList";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspShareList".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspShareList".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspShowClearUnreadUi {
#[prost(bool, tag = "1")]
pub display: bool,
#[prost(string, tag = "2")]
pub text: ::prost::alloc::string::String,
}
impl ::prost::Name for RspShowClearUnreadUi {
const NAME: &'static str = "RspShowClearUnreadUI";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspShowClearUnreadUI".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspShowClearUnreadUI".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RspSingleUnread {
#[prost(int64, tag = "1")]
pub unfollow_unread: i64,
#[prost(int64, tag = "2")]
pub follow_unread: i64,
#[prost(int32, tag = "3")]
pub unfollow_push_msg: i32,
#[prost(int32, tag = "4")]
pub dustbin_push_msg: i32,
#[prost(int64, tag = "5")]
pub dustbin_unread: i64,
#[prost(int64, tag = "6")]
pub biz_msg_unfollow_unread: i64,
#[prost(int64, tag = "7")]
pub biz_msg_follow_unread: i64,
}
impl ::prost::Name for RspSingleUnread {
const NAME: &'static str = "RspSingleUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSingleUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSingleUnread".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspSpecificSingleUnread {
#[prost(map = "int64, int64", tag = "1")]
pub talker_unread_cnt: ::std::collections::HashMap<i64, i64>,
#[prost(int64, tag = "2")]
pub all_unread_cnt: i64,
}
impl ::prost::Name for RspSpecificSingleUnread {
const NAME: &'static str = "RspSpecificSingleUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSpecificSingleUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSpecificSingleUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RspSyncAck {}
impl ::prost::Name for RspSyncAck {
const NAME: &'static str = "RspSyncAck";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspSyncAck".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspSyncAck".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspTotalUnread {
#[prost(message, optional, tag = "1")]
pub session_single_unread: ::core::option::Option<SessionSingleUnreadRsp>,
#[prost(message, optional, tag = "2")]
pub msg_feed_unread: ::core::option::Option<MsgFeedUnreadRsp>,
#[prost(message, optional, tag = "3")]
pub sys_msg_interface_last_msg: ::core::option::Option<SysMsgInterfaceLastMsgRsp>,
#[prost(int32, tag = "4")]
pub total_unread: i32,
#[prost(int64, tag = "5")]
pub custom_unread: i64,
#[prost(message, optional, tag = "6")]
pub new_total_unread: ::core::option::Option<NewTotalUnread>,
}
impl ::prost::Name for RspTotalUnread {
const NAME: &'static str = "RspTotalUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspTotalUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspTotalUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RspUpdateTotalUnread {}
impl ::prost::Name for RspUpdateTotalUnread {
const NAME: &'static str = "RspUpdateTotalUnread";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.RspUpdateTotalUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.RspUpdateTotalUnread".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SessionSingleUnreadRsp {
#[prost(int64, tag = "1")]
pub unfollow_unread: i64,
#[prost(int64, tag = "2")]
pub follow_unread: i64,
#[prost(int32, tag = "3")]
pub unfollow_push_msg: i32,
#[prost(int32, tag = "4")]
pub dustbin_push_msg: i32,
#[prost(int64, tag = "5")]
pub dustbin_unread: i64,
#[prost(int64, tag = "6")]
pub biz_msg_unfollow_unread: i64,
#[prost(int64, tag = "7")]
pub biz_msg_follow_unread: i64,
#[prost(int64, tag = "8")]
pub huahuo_unread: i64,
#[prost(int64, tag = "9")]
pub custom_unread: i64,
}
impl ::prost::Name for SessionSingleUnreadRsp {
const NAME: &'static str = "SessionSingleUnreadRsp";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.SessionSingleUnreadRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.SessionSingleUnreadRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShareSessionInfo {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(string, tag = "2")]
pub talker_uname: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub talker_icon: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub official_type: i32,
}
impl ::prost::Name for ShareSessionInfo {
const NAME: &'static str = "ShareSessionInfo";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.ShareSessionInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.ShareSessionInfo".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SimpleSession {
#[prost(int64, tag = "1")]
pub talker_id: i64,
#[prost(int32, tag = "2")]
pub session_type: i32,
}
impl ::prost::Name for SimpleSession {
const NAME: &'static str = "SimpleSession";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.SimpleSession".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.SimpleSession".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleDiscussInImPage {
#[prost(int64, tag = "1")]
pub discuss_id: i64,
#[prost(int64, tag = "2")]
pub mid: i64,
#[prost(string, tag = "3")]
pub face: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub unread_count: i32,
#[prost(int32, tag = "6")]
pub r#type: i32,
}
impl ::prost::Name for SingleDiscussInImPage {
const NAME: &'static str = "SingleDiscussInImPage";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.SingleDiscussInImPage".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.SingleDiscussInImPage".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SysMsgInterfaceLastMsgRsp {
#[prost(int32, tag = "1")]
pub unread: i32,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub time: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub id: i64,
}
impl ::prost::Name for SysMsgInterfaceLastMsgRsp {
const NAME: &'static str = "SysMsgInterfaceLastMsgRsp";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.SysMsgInterfaceLastMsgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.SysMsgInterfaceLastMsgRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserCosmoStateReq {
#[prost(string, tag = "1")]
pub business: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub card_send_mid: i64,
#[prost(int32, tag = "3")]
pub cosmo_state: i32,
#[prost(int32, tag = "4")]
pub op_type: i32,
}
impl ::prost::Name for UpdateUserCosmoStateReq {
const NAME: &'static str = "UpdateUserCosmoStateReq";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.UpdateUserCosmoStateReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.UpdateUserCosmoStateReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserCosmoStateRsp {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
}
impl ::prost::Name for UpdateUserCosmoStateRsp {
const NAME: &'static str = "UpdateUserCosmoStateRsp";
const PACKAGE: &'static str = "bilibili.im.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.interfaces.v1.UpdateUserCosmoStateRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.interfaces.v1.UpdateUserCosmoStateRsp".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MsgLikeAction {
ActionUnspecified = 0,
ActionLike = 1,
ActionCancelLike = 2,
ActionDislike = 3,
ActionCancelDislike = 4,
}
impl MsgLikeAction {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ActionUnspecified => "ACTION_UNSPECIFIED",
Self::ActionLike => "ACTION_LIKE",
Self::ActionCancelLike => "ACTION_CANCEL_LIKE",
Self::ActionDislike => "ACTION_DISLIKE",
Self::ActionCancelDislike => "ACTION_CANCEL_DISLIKE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACTION_UNSPECIFIED" => Some(Self::ActionUnspecified),
"ACTION_LIKE" => Some(Self::ActionLike),
"ACTION_CANCEL_LIKE" => Some(Self::ActionCancelLike),
"ACTION_DISLIKE" => Some(Self::ActionDislike),
"ACTION_CANCEL_DISLIKE" => Some(Self::ActionCancelDislike),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MsgLikeState {
StateUnspecified = 0,
StateLike = 1,
StateDislike = 2,
}
impl MsgLikeState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::StateUnspecified => "STATE_UNSPECIFIED",
Self::StateLike => "STATE_LIKE",
Self::StateDislike => "STATE_DISLIKE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::StateUnspecified),
"STATE_LIKE" => Some(Self::StateLike),
"STATE_DISLIKE" => Some(Self::StateDislike),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UpdateUnreadScope {
All = 0,
Dustbin = 1,
Unfollowed = 2,
Stranger = 3,
}
impl UpdateUnreadScope {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::All => "All",
Self::Dustbin => "Dustbin",
Self::Unfollowed => "Unfollowed",
Self::Stranger => "Stranger",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"All" => Some(Self::All),
"Dustbin" => Some(Self::Dustbin),
"Unfollowed" => Some(Self::Unfollowed),
"Stranger" => Some(Self::Stranger),
_ => None,
}
}
}
#[cfg(feature = "feat-enable-generated-client")]
pub mod im_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 ImInterfaceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ImInterfaceClient<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,
) -> ImInterfaceClient<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,
{
ImInterfaceClient::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 ack_assis_msg(
&mut self,
request: impl tonic::IntoRequest<super::ReqAckAssisMsg>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/AckAssisMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"AckAssisMsg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn ack_sessions(
&mut self,
request: impl tonic::IntoRequest<super::ReqAckSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, 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.interfaces.v1.ImInterface/AckSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"AckSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_msg_detail(
&mut self,
request: impl tonic::IntoRequest<super::ReqGetMsg>,
) -> std::result::Result<tonic::Response<super::RspGetMsg>, 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.interfaces.v1.ImInterface/BatchGetMsgDetail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"BatchGetMsgDetail",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_rm_dustbin(
&mut self,
request: impl tonic::IntoRequest<super::DummyReq>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/BatchRmDustbin",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"BatchRmDustbin",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_rm_sessions(
&mut self,
request: impl tonic::IntoRequest<super::ReqBatRmSess>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/BatchRmSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"BatchRmSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_sess_detail(
&mut self,
request: impl tonic::IntoRequest<super::ReqSessionDetails>,
) -> std::result::Result<
tonic::Response<super::RspSessionDetails>,
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.interfaces.v1.ImInterface/BatchSessDetail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"BatchSessDetail",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_update_dustbin_ack(
&mut self,
request: impl tonic::IntoRequest<super::DummyReq>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/BatchUpdateDustbinAck",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"BatchUpdateDustbinAck",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn close_clear_unread_ui(
&mut self,
request: impl tonic::IntoRequest<super::ReqCloseClearUnreadUi>,
) -> std::result::Result<
tonic::Response<super::RspCloseClearUnreadUi>,
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.interfaces.v1.ImInterface/CloseClearUnreadUI",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"CloseClearUnreadUI",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_discuss_list_in_im_page(
&mut self,
request: impl tonic::IntoRequest<super::ReqGetDiscussListInImPage>,
) -> std::result::Result<
tonic::Response<super::RspGetDiscussListInImPage>,
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.interfaces.v1.ImInterface/GetDiscussListInImPage",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GetDiscussListInImPage",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_live_info(
&mut self,
request: impl tonic::IntoRequest<super::ReqLiveInfo>,
) -> std::result::Result<tonic::Response<super::RspLiveInfo>, 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.interfaces.v1.ImInterface/GetLiveInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GetLiveInfo",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_sessions(
&mut self,
request: impl tonic::IntoRequest<super::ReqGetSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, 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.interfaces.v1.ImInterface/GetSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GetSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_specific_sessions(
&mut self,
request: impl tonic::IntoRequest<super::ReqGetSpecificSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, 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.interfaces.v1.ImInterface/GetSpecificSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GetSpecificSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_total_unread(
&mut self,
request: impl tonic::IntoRequest<super::ReqTotalUnread>,
) -> std::result::Result<tonic::Response<super::RspTotalUnread>, 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.interfaces.v1.ImInterface/GetTotalUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GetTotalUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_user_cosmo_state(
&mut self,
request: impl tonic::IntoRequest<super::GetUserCosmoStateReq>,
) -> std::result::Result<
tonic::Response<super::GetUserCosmoStateRsp>,
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.interfaces.v1.ImInterface/GetUserCosmoState",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GetUserCosmoState",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn group_assis_msg(
&mut self,
request: impl tonic::IntoRequest<super::ReqGroupAssisMsg>,
) -> std::result::Result<tonic::Response<super::RspSessionMsg>, 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.interfaces.v1.ImInterface/GroupAssisMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"GroupAssisMsg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn like_msg(
&mut self,
request: impl tonic::IntoRequest<super::ReqLikeMsg>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/LikeMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.im.interfaces.v1.ImInterface", "LikeMsg"),
);
self.inner.unary(req, path, codec).await
}
pub async fn msg_has_like(
&mut self,
request: impl tonic::IntoRequest<super::ReqMsgHasLike>,
) -> std::result::Result<tonic::Response<super::RspMsgHasLike>, 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.interfaces.v1.ImInterface/MsgHasLike",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"MsgHasLike",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn my_group_unread(
&mut self,
request: impl tonic::IntoRequest<super::DummyReq>,
) -> std::result::Result<
tonic::Response<super::RspMyGroupUnread>,
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.interfaces.v1.ImInterface/MyGroupUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"MyGroupUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn new_sessions(
&mut self,
request: impl tonic::IntoRequest<super::ReqNewSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, 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.interfaces.v1.ImInterface/NewSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"NewSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_session(
&mut self,
request: impl tonic::IntoRequest<super::ReqRemoveSession>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/RemoveSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"RemoveSession",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn send_msg(
&mut self,
request: impl tonic::IntoRequest<super::ReqSendMsg>,
) -> std::result::Result<tonic::Response<super::RspSendMsg>, 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.interfaces.v1.ImInterface/SendMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.im.interfaces.v1.ImInterface", "SendMsg"),
);
self.inner.unary(req, path, codec).await
}
pub async fn session_detail(
&mut self,
request: impl tonic::IntoRequest<super::ReqSessionDetail>,
) -> std::result::Result<
tonic::Response<super::super::super::r#type::SessionInfo>,
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.interfaces.v1.ImInterface/SessionDetail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"SessionDetail",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_top(
&mut self,
request: impl tonic::IntoRequest<super::ReqSetTop>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/SetTop",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.im.interfaces.v1.ImInterface", "SetTop"),
);
self.inner.unary(req, path, codec).await
}
pub async fn share_list(
&mut self,
request: impl tonic::IntoRequest<super::ReqShareList>,
) -> std::result::Result<tonic::Response<super::RspShareList>, 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.interfaces.v1.ImInterface/ShareList",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.im.interfaces.v1.ImInterface", "ShareList"),
);
self.inner.unary(req, path, codec).await
}
pub async fn show_clear_unread_ui(
&mut self,
request: impl tonic::IntoRequest<super::ReqShowClearUnreadUi>,
) -> std::result::Result<
tonic::Response<super::RspShowClearUnreadUi>,
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.interfaces.v1.ImInterface/ShowClearUnreadUI",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"ShowClearUnreadUI",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn single_unread(
&mut self,
request: impl tonic::IntoRequest<super::ReqSingleUnread>,
) -> std::result::Result<
tonic::Response<super::RspSingleUnread>,
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.interfaces.v1.ImInterface/SingleUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"SingleUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn specific_single_unread(
&mut self,
request: impl tonic::IntoRequest<super::ReqSpecificSingleUnread>,
) -> std::result::Result<
tonic::Response<super::RspSpecificSingleUnread>,
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.interfaces.v1.ImInterface/SpecificSingleUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"SpecificSingleUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn sync_ack(
&mut self,
request: impl tonic::IntoRequest<super::ReqSyncAck>,
) -> std::result::Result<tonic::Response<super::RspSyncAck>, 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.interfaces.v1.ImInterface/SyncAck",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.im.interfaces.v1.ImInterface", "SyncAck"),
);
self.inner.unary(req, path, codec).await
}
pub async fn sync_fetch_session_msgs(
&mut self,
request: impl tonic::IntoRequest<super::ReqSessionMsg>,
) -> std::result::Result<tonic::Response<super::RspSessionMsg>, 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.interfaces.v1.ImInterface/SyncFetchSessionMsgs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"SyncFetchSessionMsgs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn sync_relation(
&mut self,
request: impl tonic::IntoRequest<super::ReqRelationSync>,
) -> std::result::Result<
tonic::Response<super::RspRelationSync>,
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.interfaces.v1.ImInterface/SyncRelation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"SyncRelation",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_ack(
&mut self,
request: impl tonic::IntoRequest<super::ReqUpdateAck>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/UpdateAck",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.im.interfaces.v1.ImInterface", "UpdateAck"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_intercept(
&mut self,
request: impl tonic::IntoRequest<super::ReqUpdateIntercept>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/UpdateIntercept",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"UpdateIntercept",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_total_unread(
&mut self,
request: impl tonic::IntoRequest<super::ReqUpdateTotalUnread>,
) -> std::result::Result<
tonic::Response<super::RspUpdateTotalUnread>,
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.interfaces.v1.ImInterface/UpdateTotalUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"UpdateTotalUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_unflw_read(
&mut self,
request: impl tonic::IntoRequest<super::DummyReq>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, 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.interfaces.v1.ImInterface/UpdateUnflwRead",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"UpdateUnflwRead",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_user_cosmo_state(
&mut self,
request: impl tonic::IntoRequest<super::UpdateUserCosmoStateReq>,
) -> std::result::Result<
tonic::Response<super::UpdateUserCosmoStateRsp>,
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.interfaces.v1.ImInterface/UpdateUserCosmoState",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.interfaces.v1.ImInterface",
"UpdateUserCosmoState",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "feat-enable-generated-server")]
pub mod im_interface_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait ImInterface: std::marker::Send + std::marker::Sync + 'static {
async fn ack_assis_msg(
&self,
request: tonic::Request<super::ReqAckAssisMsg>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn ack_sessions(
&self,
request: tonic::Request<super::ReqAckSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, tonic::Status>;
async fn batch_get_msg_detail(
&self,
request: tonic::Request<super::ReqGetMsg>,
) -> std::result::Result<tonic::Response<super::RspGetMsg>, tonic::Status>;
async fn batch_rm_dustbin(
&self,
request: tonic::Request<super::DummyReq>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn batch_rm_sessions(
&self,
request: tonic::Request<super::ReqBatRmSess>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn batch_sess_detail(
&self,
request: tonic::Request<super::ReqSessionDetails>,
) -> std::result::Result<
tonic::Response<super::RspSessionDetails>,
tonic::Status,
>;
async fn batch_update_dustbin_ack(
&self,
request: tonic::Request<super::DummyReq>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn close_clear_unread_ui(
&self,
request: tonic::Request<super::ReqCloseClearUnreadUi>,
) -> std::result::Result<
tonic::Response<super::RspCloseClearUnreadUi>,
tonic::Status,
>;
async fn get_discuss_list_in_im_page(
&self,
request: tonic::Request<super::ReqGetDiscussListInImPage>,
) -> std::result::Result<
tonic::Response<super::RspGetDiscussListInImPage>,
tonic::Status,
>;
async fn get_live_info(
&self,
request: tonic::Request<super::ReqLiveInfo>,
) -> std::result::Result<tonic::Response<super::RspLiveInfo>, tonic::Status>;
async fn get_sessions(
&self,
request: tonic::Request<super::ReqGetSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, tonic::Status>;
async fn get_specific_sessions(
&self,
request: tonic::Request<super::ReqGetSpecificSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, tonic::Status>;
async fn get_total_unread(
&self,
request: tonic::Request<super::ReqTotalUnread>,
) -> std::result::Result<tonic::Response<super::RspTotalUnread>, tonic::Status>;
async fn get_user_cosmo_state(
&self,
request: tonic::Request<super::GetUserCosmoStateReq>,
) -> std::result::Result<
tonic::Response<super::GetUserCosmoStateRsp>,
tonic::Status,
>;
async fn group_assis_msg(
&self,
request: tonic::Request<super::ReqGroupAssisMsg>,
) -> std::result::Result<tonic::Response<super::RspSessionMsg>, tonic::Status>;
async fn like_msg(
&self,
request: tonic::Request<super::ReqLikeMsg>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn msg_has_like(
&self,
request: tonic::Request<super::ReqMsgHasLike>,
) -> std::result::Result<tonic::Response<super::RspMsgHasLike>, tonic::Status>;
async fn my_group_unread(
&self,
request: tonic::Request<super::DummyReq>,
) -> std::result::Result<
tonic::Response<super::RspMyGroupUnread>,
tonic::Status,
>;
async fn new_sessions(
&self,
request: tonic::Request<super::ReqNewSessions>,
) -> std::result::Result<tonic::Response<super::RspSessions>, tonic::Status>;
async fn remove_session(
&self,
request: tonic::Request<super::ReqRemoveSession>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn send_msg(
&self,
request: tonic::Request<super::ReqSendMsg>,
) -> std::result::Result<tonic::Response<super::RspSendMsg>, tonic::Status>;
async fn session_detail(
&self,
request: tonic::Request<super::ReqSessionDetail>,
) -> std::result::Result<
tonic::Response<super::super::super::r#type::SessionInfo>,
tonic::Status,
>;
async fn set_top(
&self,
request: tonic::Request<super::ReqSetTop>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn share_list(
&self,
request: tonic::Request<super::ReqShareList>,
) -> std::result::Result<tonic::Response<super::RspShareList>, tonic::Status>;
async fn show_clear_unread_ui(
&self,
request: tonic::Request<super::ReqShowClearUnreadUi>,
) -> std::result::Result<
tonic::Response<super::RspShowClearUnreadUi>,
tonic::Status,
>;
async fn single_unread(
&self,
request: tonic::Request<super::ReqSingleUnread>,
) -> std::result::Result<tonic::Response<super::RspSingleUnread>, tonic::Status>;
async fn specific_single_unread(
&self,
request: tonic::Request<super::ReqSpecificSingleUnread>,
) -> std::result::Result<
tonic::Response<super::RspSpecificSingleUnread>,
tonic::Status,
>;
async fn sync_ack(
&self,
request: tonic::Request<super::ReqSyncAck>,
) -> std::result::Result<tonic::Response<super::RspSyncAck>, tonic::Status>;
async fn sync_fetch_session_msgs(
&self,
request: tonic::Request<super::ReqSessionMsg>,
) -> std::result::Result<tonic::Response<super::RspSessionMsg>, tonic::Status>;
async fn sync_relation(
&self,
request: tonic::Request<super::ReqRelationSync>,
) -> std::result::Result<tonic::Response<super::RspRelationSync>, tonic::Status>;
async fn update_ack(
&self,
request: tonic::Request<super::ReqUpdateAck>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn update_intercept(
&self,
request: tonic::Request<super::ReqUpdateIntercept>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn update_total_unread(
&self,
request: tonic::Request<super::ReqUpdateTotalUnread>,
) -> std::result::Result<
tonic::Response<super::RspUpdateTotalUnread>,
tonic::Status,
>;
async fn update_unflw_read(
&self,
request: tonic::Request<super::DummyReq>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn update_user_cosmo_state(
&self,
request: tonic::Request<super::UpdateUserCosmoStateReq>,
) -> std::result::Result<
tonic::Response<super::UpdateUserCosmoStateRsp>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ImInterfaceServer<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> ImInterfaceServer<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 ImInterfaceServer<T>
where
T: ImInterface,
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.interfaces.v1.ImInterface/AckAssisMsg" => {
#[allow(non_camel_case_types)]
struct AckAssisMsgSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqAckAssisMsg>
for AckAssisMsgSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqAckAssisMsg>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::ack_assis_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 = AckAssisMsgSvc(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.interfaces.v1.ImInterface/AckSessions" => {
#[allow(non_camel_case_types)]
struct AckSessionsSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqAckSessions>
for AckSessionsSvc<T> {
type Response = super::RspSessions;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqAckSessions>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::ack_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 = AckSessionsSvc(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.interfaces.v1.ImInterface/BatchGetMsgDetail" => {
#[allow(non_camel_case_types)]
struct BatchGetMsgDetailSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqGetMsg>
for BatchGetMsgDetailSvc<T> {
type Response = super::RspGetMsg;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGetMsg>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::batch_get_msg_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 = BatchGetMsgDetailSvc(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.interfaces.v1.ImInterface/BatchRmDustbin" => {
#[allow(non_camel_case_types)]
struct BatchRmDustbinSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::DummyReq>
for BatchRmDustbinSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DummyReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::batch_rm_dustbin(&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 = BatchRmDustbinSvc(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.interfaces.v1.ImInterface/BatchRmSessions" => {
#[allow(non_camel_case_types)]
struct BatchRmSessionsSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqBatRmSess>
for BatchRmSessionsSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqBatRmSess>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::batch_rm_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 = BatchRmSessionsSvc(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.interfaces.v1.ImInterface/BatchSessDetail" => {
#[allow(non_camel_case_types)]
struct BatchSessDetailSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqSessionDetails>
for BatchSessDetailSvc<T> {
type Response = super::RspSessionDetails;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSessionDetails>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::batch_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 = BatchSessDetailSvc(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.interfaces.v1.ImInterface/BatchUpdateDustbinAck" => {
#[allow(non_camel_case_types)]
struct BatchUpdateDustbinAckSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::DummyReq>
for BatchUpdateDustbinAckSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DummyReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::batch_update_dustbin_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 = BatchUpdateDustbinAckSvc(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.interfaces.v1.ImInterface/CloseClearUnreadUI" => {
#[allow(non_camel_case_types)]
struct CloseClearUnreadUISvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqCloseClearUnreadUi>
for CloseClearUnreadUISvc<T> {
type Response = super::RspCloseClearUnreadUi;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqCloseClearUnreadUi>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::close_clear_unread_ui(&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 = CloseClearUnreadUISvc(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.interfaces.v1.ImInterface/GetDiscussListInImPage" => {
#[allow(non_camel_case_types)]
struct GetDiscussListInImPageSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqGetDiscussListInImPage>
for GetDiscussListInImPageSvc<T> {
type Response = super::RspGetDiscussListInImPage;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGetDiscussListInImPage>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::get_discuss_list_in_im_page(
&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 = GetDiscussListInImPageSvc(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.interfaces.v1.ImInterface/GetLiveInfo" => {
#[allow(non_camel_case_types)]
struct GetLiveInfoSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqLiveInfo>
for GetLiveInfoSvc<T> {
type Response = super::RspLiveInfo;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqLiveInfo>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::get_live_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 = GetLiveInfoSvc(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.interfaces.v1.ImInterface/GetSessions" => {
#[allow(non_camel_case_types)]
struct GetSessionsSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqGetSessions>
for GetSessionsSvc<T> {
type Response = super::RspSessions;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGetSessions>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::get_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 = GetSessionsSvc(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.interfaces.v1.ImInterface/GetSpecificSessions" => {
#[allow(non_camel_case_types)]
struct GetSpecificSessionsSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqGetSpecificSessions>
for GetSpecificSessionsSvc<T> {
type Response = super::RspSessions;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGetSpecificSessions>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::get_specific_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 = GetSpecificSessionsSvc(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.interfaces.v1.ImInterface/GetTotalUnread" => {
#[allow(non_camel_case_types)]
struct GetTotalUnreadSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqTotalUnread>
for GetTotalUnreadSvc<T> {
type Response = super::RspTotalUnread;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqTotalUnread>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::get_total_unread(&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 = GetTotalUnreadSvc(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.interfaces.v1.ImInterface/GetUserCosmoState" => {
#[allow(non_camel_case_types)]
struct GetUserCosmoStateSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::GetUserCosmoStateReq>
for GetUserCosmoStateSvc<T> {
type Response = super::GetUserCosmoStateRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetUserCosmoStateReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::get_user_cosmo_state(&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 = GetUserCosmoStateSvc(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.interfaces.v1.ImInterface/GroupAssisMsg" => {
#[allow(non_camel_case_types)]
struct GroupAssisMsgSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqGroupAssisMsg>
for GroupAssisMsgSvc<T> {
type Response = super::RspSessionMsg;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGroupAssisMsg>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::group_assis_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 = GroupAssisMsgSvc(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.interfaces.v1.ImInterface/LikeMsg" => {
#[allow(non_camel_case_types)]
struct LikeMsgSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqLikeMsg>
for LikeMsgSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqLikeMsg>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::like_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 = LikeMsgSvc(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.interfaces.v1.ImInterface/MsgHasLike" => {
#[allow(non_camel_case_types)]
struct MsgHasLikeSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqMsgHasLike>
for MsgHasLikeSvc<T> {
type Response = super::RspMsgHasLike;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqMsgHasLike>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::msg_has_like(&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 = MsgHasLikeSvc(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.interfaces.v1.ImInterface/MyGroupUnread" => {
#[allow(non_camel_case_types)]
struct MyGroupUnreadSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::DummyReq>
for MyGroupUnreadSvc<T> {
type Response = super::RspMyGroupUnread;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DummyReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::my_group_unread(&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 = MyGroupUnreadSvc(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.interfaces.v1.ImInterface/NewSessions" => {
#[allow(non_camel_case_types)]
struct NewSessionsSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqNewSessions>
for NewSessionsSvc<T> {
type Response = super::RspSessions;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqNewSessions>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::new_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 = NewSessionsSvc(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.interfaces.v1.ImInterface/RemoveSession" => {
#[allow(non_camel_case_types)]
struct RemoveSessionSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqRemoveSession>
for RemoveSessionSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqRemoveSession>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::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.interfaces.v1.ImInterface/SendMsg" => {
#[allow(non_camel_case_types)]
struct SendMsgSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqSendMsg>
for SendMsgSvc<T> {
type Response = super::RspSendMsg;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSendMsg>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::send_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 = SendMsgSvc(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.interfaces.v1.ImInterface/SessionDetail" => {
#[allow(non_camel_case_types)]
struct SessionDetailSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqSessionDetail>
for SessionDetailSvc<T> {
type Response = super::super::super::r#type::SessionInfo;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSessionDetail>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::session_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 = SessionDetailSvc(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.interfaces.v1.ImInterface/SetTop" => {
#[allow(non_camel_case_types)]
struct SetTopSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqSetTop>
for SetTopSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSetTop>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::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.interfaces.v1.ImInterface/ShareList" => {
#[allow(non_camel_case_types)]
struct ShareListSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqShareList>
for ShareListSvc<T> {
type Response = super::RspShareList;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqShareList>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::share_list(&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 = ShareListSvc(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.interfaces.v1.ImInterface/ShowClearUnreadUI" => {
#[allow(non_camel_case_types)]
struct ShowClearUnreadUISvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqShowClearUnreadUi>
for ShowClearUnreadUISvc<T> {
type Response = super::RspShowClearUnreadUi;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqShowClearUnreadUi>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::show_clear_unread_ui(&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 = ShowClearUnreadUISvc(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.interfaces.v1.ImInterface/SingleUnread" => {
#[allow(non_camel_case_types)]
struct SingleUnreadSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqSingleUnread>
for SingleUnreadSvc<T> {
type Response = super::RspSingleUnread;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSingleUnread>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::single_unread(&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 = SingleUnreadSvc(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.interfaces.v1.ImInterface/SpecificSingleUnread" => {
#[allow(non_camel_case_types)]
struct SpecificSingleUnreadSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqSpecificSingleUnread>
for SpecificSingleUnreadSvc<T> {
type Response = super::RspSpecificSingleUnread;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSpecificSingleUnread>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::specific_single_unread(&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 = SpecificSingleUnreadSvc(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.interfaces.v1.ImInterface/SyncAck" => {
#[allow(non_camel_case_types)]
struct SyncAckSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqSyncAck>
for SyncAckSvc<T> {
type Response = super::RspSyncAck;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSyncAck>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::sync_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 = SyncAckSvc(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.interfaces.v1.ImInterface/SyncFetchSessionMsgs" => {
#[allow(non_camel_case_types)]
struct SyncFetchSessionMsgsSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqSessionMsg>
for SyncFetchSessionMsgsSvc<T> {
type Response = super::RspSessionMsg;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSessionMsg>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::sync_fetch_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 = SyncFetchSessionMsgsSvc(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.interfaces.v1.ImInterface/SyncRelation" => {
#[allow(non_camel_case_types)]
struct SyncRelationSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqRelationSync>
for SyncRelationSvc<T> {
type Response = super::RspRelationSync;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqRelationSync>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::sync_relation(&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 = SyncRelationSvc(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.interfaces.v1.ImInterface/UpdateAck" => {
#[allow(non_camel_case_types)]
struct UpdateAckSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::ReqUpdateAck>
for UpdateAckSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqUpdateAck>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::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 = UpdateAckSvc(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.interfaces.v1.ImInterface/UpdateIntercept" => {
#[allow(non_camel_case_types)]
struct UpdateInterceptSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqUpdateIntercept>
for UpdateInterceptSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqUpdateIntercept>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::update_intercept(&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 = UpdateInterceptSvc(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.interfaces.v1.ImInterface/UpdateTotalUnread" => {
#[allow(non_camel_case_types)]
struct UpdateTotalUnreadSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::ReqUpdateTotalUnread>
for UpdateTotalUnreadSvc<T> {
type Response = super::RspUpdateTotalUnread;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqUpdateTotalUnread>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::update_total_unread(&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 = UpdateTotalUnreadSvc(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.interfaces.v1.ImInterface/UpdateUnflwRead" => {
#[allow(non_camel_case_types)]
struct UpdateUnflwReadSvc<T: ImInterface>(pub Arc<T>);
impl<T: ImInterface> tonic::server::UnaryService<super::DummyReq>
for UpdateUnflwReadSvc<T> {
type Response = super::DummyRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DummyReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::update_unflw_read(&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 = UpdateUnflwReadSvc(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.interfaces.v1.ImInterface/UpdateUserCosmoState" => {
#[allow(non_camel_case_types)]
struct UpdateUserCosmoStateSvc<T: ImInterface>(pub Arc<T>);
impl<
T: ImInterface,
> tonic::server::UnaryService<super::UpdateUserCosmoStateReq>
for UpdateUserCosmoStateSvc<T> {
type Response = super::UpdateUserCosmoStateRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpdateUserCosmoStateReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImInterface>::update_user_cosmo_state(&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 = UpdateUserCosmoStateSvc(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 ImInterfaceServer<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.interfaces.v1.ImInterface";
impl<T> tonic::server::NamedService for ImInterfaceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}