#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AtBiz {
#[prost(int64, tag = "1")]
pub subject_id: i64,
#[prost(int64, tag = "2")]
pub root_id: i64,
#[prost(int64, tag = "3")]
pub source_id: i64,
#[prost(int64, tag = "4")]
pub target_id: i64,
#[prost(string, tag = "5")]
pub source_content: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "6")]
pub at_details: ::prost::alloc::vec::Vec<User>,
#[prost(bool, tag = "7")]
pub hide_reply_button: bool,
}
impl ::prost::Name for AtBiz {
const NAME: &'static str = "AtBiz";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.AtBiz".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.AtBiz".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AtCard {
#[prost(message, optional, tag = "1")]
pub at_msg: ::core::option::Option<CommonMsgCard>,
#[prost(message, optional, tag = "2")]
pub at_biz: ::core::option::Option<AtBiz>,
}
impl ::prost::Name for AtCard {
const NAME: &'static str = "AtCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.AtCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.AtCard".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BubbleMsg {
#[prost(int64, tag = "1")]
pub mid: i64,
#[prost(string, tag = "2")]
pub avatar: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub nick_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub content: ::prost::alloc::string::String,
#[prost(enumeration = "MsgTabType", tag = "5")]
pub tab_type: i32,
#[prost(enumeration = "MsgFeedMsgType", tag = "6")]
pub msg_type: i32,
}
impl ::prost::Name for BubbleMsg {
const NAME: &'static str = "BubbleMsg";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.BubbleMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.BubbleMsg".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardItem {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(int64, tag = "2")]
pub item_id: i64,
#[prost(int64, tag = "3")]
pub origin_id: i64,
#[prost(int64, tag = "4")]
pub business_id: i64,
#[prost(string, tag = "7")]
pub cover_title: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub cover_desc: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub cover_image: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub cover_text: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub native_uri: ::prost::alloc::string::String,
}
impl ::prost::Name for CardItem {
const NAME: &'static str = "CardItem";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.CardItem".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.CardItem".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ClearBubbleMsgReq {
#[prost(enumeration = "MsgTabType", tag = "1")]
pub tab_type: i32,
}
impl ::prost::Name for ClearBubbleMsgReq {
const NAME: &'static str = "ClearBubbleMsgReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ClearBubbleMsgReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ClearBubbleMsgReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ClearBubbleMsgRsp {}
impl ::prost::Name for ClearBubbleMsgRsp {
const NAME: &'static str = "ClearBubbleMsgRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ClearBubbleMsgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ClearBubbleMsgRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ClearMessageToastReq {
#[prost(enumeration = "ToastType", tag = "1")]
pub toast_type: i32,
}
impl ::prost::Name for ClearMessageToastReq {
const NAME: &'static str = "ClearMessageToastReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ClearMessageToastReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ClearMessageToastReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CoinCard {
#[prost(message, optional, tag = "1")]
pub coin_msg: ::core::option::Option<CommonMsgCard>,
#[prost(int32, tag = "2")]
pub notice_state: i32,
#[prost(message, optional, tag = "3")]
pub thank_button: ::core::option::Option<ThankButton>,
}
impl ::prost::Name for CoinCard {
const NAME: &'static str = "CoinCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.CoinCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.CoinCard".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommonMsgCard {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(message, repeated, tag = "2")]
pub users: ::prost::alloc::vec::Vec<User>,
#[prost(int64, tag = "3")]
pub item_id: i64,
#[prost(int64, tag = "4")]
pub msg_time: i64,
#[prost(int64, tag = "5")]
pub origin_id: i64,
#[prost(int64, tag = "6")]
pub business_id: i64,
#[prost(string, tag = "7")]
pub cover_image: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub cover_text: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub native_uri: ::prost::alloc::string::String,
#[prost(int64, tag = "10")]
pub counts: i64,
#[prost(message, optional, tag = "11")]
pub rich_text_content: ::core::option::Option<RichTextContent>,
#[prost(string, tag = "12")]
pub biz_type: ::prost::alloc::string::String,
#[prost(bool, tag = "13")]
pub is_unread: bool,
}
impl ::prost::Name for CommonMsgCard {
const NAME: &'static str = "CommonMsgCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.CommonMsgCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.CommonMsgCard".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Cursor {
#[prost(bool, tag = "1")]
pub is_end: bool,
#[prost(int64, tag = "2")]
pub id: i64,
#[prost(int64, tag = "3")]
pub time: i64,
}
impl ::prost::Name for Cursor {
const NAME: &'static str = "Cursor";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.Cursor".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.Cursor".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DanmuCard {
#[prost(message, optional, tag = "1")]
pub danmu_msg: ::core::option::Option<CommonMsgCard>,
}
impl ::prost::Name for DanmuCard {
const NAME: &'static str = "DanmuCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DanmuCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DanmuCard".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DanmuInfo {
#[prost(int64, tag = "1")]
pub aid: i64,
#[prost(int64, tag = "2")]
pub progress: i64,
}
impl ::prost::Name for DanmuInfo {
const NAME: &'static str = "DanmuInfo";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DanmuInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DanmuInfo".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DelMsgCardReq {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(enumeration = "MsgTabType", tag = "2")]
pub tab_type: i32,
#[prost(enumeration = "MsgFeedMsgType", tag = "3")]
pub msg_type: i32,
#[prost(enumeration = "MsgFeedFilterType", tag = "4")]
pub filter_type: i32,
#[prost(bool, tag = "5")]
pub delete_top_msg: bool,
}
impl ::prost::Name for DelMsgCardReq {
const NAME: &'static str = "DelMsgCardReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DelMsgCardReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DelMsgCardReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DelMsgItem {
#[prost(int64, tag = "1")]
pub talker_uid: i64,
#[prost(int64, tag = "2")]
pub msg_key: i64,
#[prost(int64, tag = "3")]
pub seq_no: i64,
}
impl ::prost::Name for DelMsgItem {
const NAME: &'static str = "DelMsgItem";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DelMsgItem".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DelMsgItem".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelMsgReq {
#[prost(message, repeated, tag = "1")]
pub msgs: ::prost::alloc::vec::Vec<DelMsgItem>,
}
impl ::prost::Name for DelMsgReq {
const NAME: &'static str = "DelMsgReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DelMsgReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DelMsgReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelMsgRsp {
#[prost(message, repeated, tag = "1")]
pub fail: ::prost::alloc::vec::Vec<DelMsgItem>,
}
impl ::prost::Name for DelMsgRsp {
const NAME: &'static str = "DelMsgRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DelMsgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DelMsgRsp".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.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.DummyRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.DummyRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FavoriteCard {
#[prost(message, optional, tag = "1")]
pub fav_msg: ::core::option::Option<CommonMsgCard>,
#[prost(int32, tag = "2")]
pub notice_state: i32,
}
impl ::prost::Name for FavoriteCard {
const NAME: &'static str = "FavoriteCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.FavoriteCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.FavoriteCard".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetBubbleMsgReq {}
impl ::prost::Name for GetBubbleMsgReq {
const NAME: &'static str = "GetBubbleMsgReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.GetBubbleMsgReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.GetBubbleMsgReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBubbleMsgRsp {
#[prost(message, optional, tag = "1")]
pub bubble_msg: ::core::option::Option<BubbleMsg>,
}
impl ::prost::Name for GetBubbleMsgRsp {
const NAME: &'static str = "GetBubbleMsgRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.GetBubbleMsgRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.GetBubbleMsgRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetTotalUnreadReq {
#[prost(int32, tag = "1")]
pub unread_type: i32,
#[prost(int32, tag = "2")]
pub show_unfollow_list: i32,
#[prost(int32, tag = "3")]
pub show_dustbin: i32,
}
impl ::prost::Name for GetTotalUnreadReq {
const NAME: &'static str = "GetTotalUnreadReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.GetTotalUnreadReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.GetTotalUnreadReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTotalUnreadRsp {
#[prost(message, optional, tag = "1")]
pub session_unread: ::core::option::Option<SessionUnread>,
#[prost(message, optional, tag = "2")]
pub msg_feed_unread: ::core::option::Option<MsgFeedUnread>,
#[prost(message, optional, tag = "3")]
pub sys_msg_interface_last_msg: ::core::option::Option<SysMsgInterfaceLastMsg>,
#[prost(int64, tag = "4")]
pub custom_unread: i64,
#[prost(int32, tag = "5")]
pub total_unread: i32,
#[prost(message, optional, tag = "6")]
pub total_unread_new: ::core::option::Option<TotalUnreadNew>,
}
impl ::prost::Name for GetTotalUnreadRsp {
const NAME: &'static str = "GetTotalUnreadRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.GetTotalUnreadRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.GetTotalUnreadRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HarmonyTotalUnreadRsp {
#[prost(message, optional, tag = "1")]
pub total_unread: ::core::option::Option<TotalUnreadNew>,
}
impl ::prost::Name for HarmonyTotalUnreadRsp {
const NAME: &'static str = "HarmonyTotalUnreadRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.HarmonyTotalUnreadRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.HarmonyTotalUnreadRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LikeCard {
#[prost(message, optional, tag = "1")]
pub like_msg: ::core::option::Option<CommonMsgCard>,
#[prost(int32, tag = "2")]
pub notice_state: i32,
#[prost(message, optional, tag = "3")]
pub thank_button: ::core::option::Option<ThankButton>,
}
impl ::prost::Name for LikeCard {
const NAME: &'static str = "LikeCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.LikeCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.LikeCard".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MessageToastReq {}
impl ::prost::Name for MessageToastReq {
const NAME: &'static str = "MessageToastReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MessageToastReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MessageToastReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageToastRsp {
#[prost(string, tag = "1")]
pub content: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(enumeration = "ToastType", tag = "3")]
pub toast_type: i32,
}
impl ::prost::Name for MessageToastRsp {
const NAME: &'static str = "MessageToastRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MessageToastRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MessageToastRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgFeedActionReq {
#[prost(int64, tag = "1")]
pub msg_id: i64,
#[prost(enumeration = "MsgFeedActionType", tag = "2")]
pub action_type: i32,
#[prost(message, optional, tag = "3")]
pub thank_params: ::core::option::Option<MsgFeedActionThankParams>,
#[prost(enumeration = "MsgFeedMsgType", tag = "4")]
pub msg_type: i32,
#[prost(enumeration = "MsgFeedFilterType", tag = "5")]
pub filter_type: i32,
#[prost(bool, tag = "6")]
pub is_top_msg: bool,
}
impl ::prost::Name for MsgFeedActionReq {
const NAME: &'static str = "MsgFeedActionReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgFeedActionReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgFeedActionReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFeedActionRsp {
#[prost(string, tag = "1")]
pub toast: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgFeedActionRsp {
const NAME: &'static str = "MsgFeedActionRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgFeedActionRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgFeedActionRsp".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgFeedActionThankParams {
#[prost(int64, tag = "1")]
pub receiver_mid: i64,
}
impl ::prost::Name for MsgFeedActionThankParams {
const NAME: &'static str = "MsgFeedActionThankParams";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgFeedActionThankParams".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgFeedActionThankParams".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFeedFilter {
#[prost(enumeration = "MsgFeedFilterType", tag = "1")]
pub r#type: i32,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgFeedFilter {
const NAME: &'static str = "MsgFeedFilter";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgFeedFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgFeedFilter".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFeedMsgCard {
#[prost(enumeration = "MsgFeedMsgType", tag = "1")]
pub msg_type: i32,
#[prost(int64, tag = "2")]
pub msg_id: i64,
#[prost(int64, tag = "3")]
pub msg_time: i64,
#[prost(message, optional, tag = "4")]
pub msg_item: ::core::option::Option<MsgItem>,
}
impl ::prost::Name for MsgFeedMsgCard {
const NAME: &'static str = "MsgFeedMsgCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgFeedMsgCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgFeedMsgCard".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFeedUnread {
#[prost(map = "string, int64", tag = "1")]
pub unread: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
}
impl ::prost::Name for MsgFeedUnread {
const NAME: &'static str = "MsgFeedUnread";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgFeedUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgFeedUnread".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgItem {
#[prost(oneof = "msg_item::MsgCard", tags = "1, 2, 3, 4, 5, 6")]
pub msg_card: ::core::option::Option<msg_item::MsgCard>,
}
pub mod msg_item {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum MsgCard {
#[prost(message, tag = "1")]
ReplyCard(super::ReplyCard),
#[prost(message, tag = "2")]
AtCard(super::AtCard),
#[prost(message, tag = "3")]
DanmuCard(super::DanmuCard),
#[prost(message, tag = "4")]
LikeCard(super::LikeCard),
#[prost(message, tag = "5")]
CoinCard(super::CoinCard),
#[prost(message, tag = "6")]
FavoriteCard(super::FavoriteCard),
}
}
impl ::prost::Name for MsgItem {
const NAME: &'static str = "MsgItem";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgItem".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgItem".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgListLimit {
#[prost(bool, tag = "1")]
pub limit: bool,
#[prost(string, tag = "2")]
pub desc: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgListLimit {
const NAME: &'static str = "MsgListLimit";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgListLimit".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgListLimit".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgListReq {
#[prost(message, optional, tag = "1")]
pub cursor: ::core::option::Option<Cursor>,
#[prost(int64, tag = "2")]
pub pagesize: i64,
#[prost(enumeration = "MsgTabType", tag = "3")]
pub tab_type: i32,
#[prost(enumeration = "MsgFeedFilterType", tag = "4")]
pub filter_type: i32,
}
impl ::prost::Name for MsgListReq {
const NAME: &'static str = "MsgListReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgListReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgListReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgListRsp {
#[prost(message, optional, tag = "1")]
pub cursor: ::core::option::Option<Cursor>,
#[prost(message, repeated, tag = "2")]
pub msg_cards: ::prost::alloc::vec::Vec<MsgFeedMsgCard>,
#[prost(int64, tag = "3")]
pub last_view_at: i64,
#[prost(message, repeated, tag = "4")]
pub filters: ::prost::alloc::vec::Vec<MsgFeedFilter>,
#[prost(message, repeated, tag = "5")]
pub top_cards: ::prost::alloc::vec::Vec<MsgFeedMsgCard>,
#[prost(message, optional, tag = "6")]
pub limit: ::core::option::Option<MsgListLimit>,
}
impl ::prost::Name for MsgListRsp {
const NAME: &'static str = "MsgListRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.MsgListRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.MsgListRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Prompt {
#[prost(string, tag = "1")]
pub msg: ::prost::alloc::string::String,
}
impl ::prost::Name for Prompt {
const NAME: &'static str = "Prompt";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.Prompt".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.Prompt".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PromptReq {
#[prost(int64, tag = "1")]
pub talker_ai: i64,
#[prost(int64, tag = "2")]
pub key: i64,
}
impl ::prost::Name for PromptReq {
const NAME: &'static str = "PromptReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.PromptReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.PromptReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PromptRsp {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<Prompt>,
}
impl ::prost::Name for PromptRsp {
const NAME: &'static str = "PromptRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.PromptRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.PromptRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuickLinkItem {
#[prost(enumeration = "MsgTabType", tag = "1")]
pub tab_type: i32,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub icon: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub icon_dark: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub url: ::prost::alloc::string::String,
}
impl ::prost::Name for QuickLinkItem {
const NAME: &'static str = "QuickLinkItem";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.QuickLinkItem".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.QuickLinkItem".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QuickLinkReq {
#[prost(int32, tag = "1")]
pub teenager_mode: i32,
#[prost(int32, tag = "2")]
pub lessons_mode: i32,
}
impl ::prost::Name for QuickLinkReq {
const NAME: &'static str = "QuickLinkReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.QuickLinkReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.QuickLinkReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuickLinkRsp {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<QuickLinkItem>,
#[prost(bool, tag = "2")]
pub is_experiment: bool,
#[prost(message, repeated, tag = "3")]
pub filters: ::prost::alloc::vec::Vec<SessionsFilter>,
}
impl ::prost::Name for QuickLinkRsp {
const NAME: &'static str = "QuickLinkRsp";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.QuickLinkRsp".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.QuickLinkRsp".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplyBiz {
#[prost(int64, tag = "1")]
pub subject_id: i64,
#[prost(int64, tag = "2")]
pub root_id: i64,
#[prost(int64, tag = "3")]
pub source_id: i64,
#[prost(int64, tag = "4")]
pub target_id: i64,
#[prost(string, tag = "5")]
pub source_content: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub root_reply_content: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub target_reply_content: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "8")]
pub at_details: ::prost::alloc::vec::Vec<User>,
#[prost(message, repeated, tag = "9")]
pub topic_details: ::prost::alloc::vec::Vec<TopicInfo>,
#[prost(bool, tag = "10")]
pub hide_reply_button: bool,
#[prost(bool, tag = "11")]
pub hide_like_button: bool,
#[prost(int32, tag = "12")]
pub like_state: i32,
#[prost(string, tag = "13")]
pub message: ::prost::alloc::string::String,
}
impl ::prost::Name for ReplyBiz {
const NAME: &'static str = "ReplyBiz";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReplyBiz".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReplyBiz".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplyCard {
#[prost(message, optional, tag = "1")]
pub reply_msg: ::core::option::Option<CommonMsgCard>,
#[prost(message, optional, tag = "2")]
pub reply_biz: ::core::option::Option<ReplyBiz>,
}
impl ::prost::Name for ReplyCard {
const NAME: &'static str = "ReplyCard";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReplyCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReplyCard".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqGetAiInfo {
#[prost(int64, tag = "1")]
pub ai_uid: i64,
#[prost(int64, tag = "2")]
pub uid: i64,
#[prost(int64, tag = "3")]
pub guest_id: i64,
}
impl ::prost::Name for ReqGetAiInfo {
const NAME: &'static str = "ReqGetAIInfo";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqGetAIInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqGetAIInfo".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 = "11")]
pub sids: ::prost::alloc::vec::Vec<i32>,
#[prost(int64, tag = "12")]
pub ai_uid: i64,
}
impl ::prost::Name for ReqGetSessions {
const NAME: &'static str = "ReqGetSessions";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqGetSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqGetSessions".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqGetSystemNotice {}
impl ::prost::Name for ReqGetSystemNotice {
const NAME: &'static str = "ReqGetSystemNotice";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqGetSystemNotice".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqGetSystemNotice".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 = "6")]
pub sids: ::prost::alloc::vec::Vec<i32>,
}
impl ::prost::Name for ReqNewSessions {
const NAME: &'static str = "ReqNewSessions";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqNewSessions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqNewSessions".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,
#[prost(int32, tag = "5")]
pub system_msg_type: i32,
}
impl ::prost::Name for ReqRemoveSession {
const NAME: &'static str = "ReqRemoveSession";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqRemoveSession".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqRemoveSession".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,
#[prost(int32, tag = "6")]
pub system_msg_type: i32,
}
impl ::prost::Name for ReqSetTop {
const NAME: &'static str = "ReqSetTop";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqSetTop".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqSetTop".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReqSingleInbox {
#[prost(int64, tag = "1")]
pub talker_uid: i64,
#[prost(int64, tag = "2")]
pub begin_seqno: i64,
#[prost(int64, tag = "3")]
pub end_seqno: i64,
#[prost(int32, tag = "4")]
pub size: i32,
}
impl ::prost::Name for ReqSingleInbox {
const NAME: &'static str = "ReqSingleInbox";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ReqSingleInbox".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ReqSingleInbox".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RichTextContent {
#[prost(message, repeated, tag = "1")]
pub paragraphs: ::prost::alloc::vec::Vec<
super::super::super::super::app::dynamic::v2::Paragraph,
>,
}
impl ::prost::Name for RichTextContent {
const NAME: &'static str = "RichTextContent";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.RichTextContent".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.RichTextContent".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspGetAiInfo {
#[prost(message, optional, tag = "1")]
pub ai_info: ::core::option::Option<super::super::super::r#type::AiInfo>,
}
impl ::prost::Name for RspGetAiInfo {
const NAME: &'static str = "RspGetAIInfo";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.RspGetAIInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.RspGetAIInfo".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspGetSystemNotice {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
}
impl ::prost::Name for RspGetSystemNotice {
const NAME: &'static str = "RspGetSystemNotice";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.RspGetSystemNotice".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.RspGetSystemNotice".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RspSingleInbox {
#[prost(map = "int64, int64", tag = "1")]
pub msgs: ::std::collections::HashMap<i64, i64>,
}
impl ::prost::Name for RspSingleInbox {
const NAME: &'static str = "RspSingleInbox";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.RspSingleInbox".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.RspSingleInbox".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SessionUnread {
#[prost(int32, tag = "1")]
pub unfollow_unread: i32,
#[prost(int32, tag = "2")]
pub follow_unread: i32,
#[prost(int32, tag = "3")]
pub unfollow_push_msg: i32,
#[prost(int32, tag = "4")]
pub dustbin_push_msg: i32,
#[prost(int32, tag = "5")]
pub dustbin_unread: i32,
#[prost(int32, tag = "6")]
pub biz_msg_unfollow_unread: i32,
#[prost(int32, tag = "7")]
pub biz_msg_follow_unread: i32,
#[prost(int32, tag = "8")]
pub huahuo_unread: i32,
#[prost(int32, tag = "9")]
pub custom_unread: i32,
#[prost(int32, tag = "10")]
pub system_unread: i32,
#[prost(int32, tag = "11")]
pub stranger_unread: i32,
#[prost(bool, tag = "12")]
pub stranger_push_msg: bool,
#[prost(int32, tag = "13")]
pub account_unread: i32,
}
impl ::prost::Name for SessionUnread {
const NAME: &'static str = "SessionUnread";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.SessionUnread".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.SessionUnread".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionsFilter {
#[prost(enumeration = "SessionsFilterType", tag = "1")]
pub r#type: i32,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for SessionsFilter {
const NAME: &'static str = "SessionsFilter";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.SessionsFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.SessionsFilter".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetMsgFeedNoticeReq {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(enumeration = "MsgFeedMsgType", tag = "2")]
pub msg_type: i32,
#[prost(int32, tag = "3")]
pub notice_state: i32,
#[prost(bool, tag = "4")]
pub is_top_msg: bool,
}
impl ::prost::Name for SetMsgFeedNoticeReq {
const NAME: &'static str = "SetMsgFeedNoticeReq";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.SetMsgFeedNoticeReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.SetMsgFeedNoticeReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SysMsgInterfaceLastMsg {
#[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 SysMsgInterfaceLastMsg {
const NAME: &'static str = "SysMsgInterfaceLastMsg";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.SysMsgInterfaceLastMsg".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.SysMsgInterfaceLastMsg".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ThankButton {
#[prost(bool, tag = "1")]
pub has_sent: bool,
#[prost(string, tag = "2")]
pub receiver_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub sender_avatar: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub msg_text: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub receiver_mid: i64,
}
impl ::prost::Name for ThankButton {
const NAME: &'static str = "ThankButton";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.ThankButton".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.ThankButton".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TopicInfo {
#[prost(int64, tag = "1")]
pub topic_id: i64,
#[prost(string, tag = "2")]
pub topic_name: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub is_activity: i64,
#[prost(string, tag = "4")]
pub topic_link: ::prost::alloc::string::String,
}
impl ::prost::Name for TopicInfo {
const NAME: &'static str = "TopicInfo";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.TopicInfo".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.TopicInfo".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TotalUnreadNew {
#[prost(int32, tag = "1")]
pub unread_count: i32,
#[prost(int32, tag = "2")]
pub unread_type: i32,
}
impl ::prost::Name for TotalUnreadNew {
const NAME: &'static str = "TotalUnreadNew";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.TotalUnreadNew".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.TotalUnreadNew".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(int64, tag = "1")]
pub mid: i64,
#[prost(string, tag = "2")]
pub nickname: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub avatar: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub link: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub guest: bool,
}
impl ::prost::Name for User {
const NAME: &'static str = "User";
const PACKAGE: &'static str = "bilibili.im.gateway.interfaces.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.im.gateway.interfaces.v1.User".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.im.gateway.interfaces.v1.User".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MsgFeedActionType {
Invalid = 0,
Thank = 1,
}
impl MsgFeedActionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Invalid => "MSG_FEED_ACTION_TYPE_INVALID",
Self::Thank => "MSG_FEED_ACTION_TYPE_THANK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MSG_FEED_ACTION_TYPE_INVALID" => Some(Self::Invalid),
"MSG_FEED_ACTION_TYPE_THANK" => Some(Self::Thank),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MsgFeedFilterType {
MsgFeedAll = 0,
MsgFeedFollowing = 1,
MsgFeedAtMe = 2,
}
impl MsgFeedFilterType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MsgFeedAll => "MsgFeed_All",
Self::MsgFeedFollowing => "MsgFeed_Following",
Self::MsgFeedAtMe => "MsgFeed_AtMe",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MsgFeed_All" => Some(Self::MsgFeedAll),
"MsgFeed_Following" => Some(Self::MsgFeedFollowing),
"MsgFeed_AtMe" => Some(Self::MsgFeedAtMe),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MsgFeedMsgType {
LikeMsg = 0,
ReplyMsg = 1,
AtMsg = 2,
DanmuMsg = 3,
CoinMsg = 4,
FavoriteMsg = 5,
}
impl MsgFeedMsgType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::LikeMsg => "LikeMsg",
Self::ReplyMsg => "ReplyMsg",
Self::AtMsg => "AtMsg",
Self::DanmuMsg => "DanmuMsg",
Self::CoinMsg => "CoinMsg",
Self::FavoriteMsg => "FavoriteMsg",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LikeMsg" => Some(Self::LikeMsg),
"ReplyMsg" => Some(Self::ReplyMsg),
"AtMsg" => Some(Self::AtMsg),
"DanmuMsg" => Some(Self::DanmuMsg),
"CoinMsg" => Some(Self::CoinMsg),
"FavoriteMsg" => Some(Self::FavoriteMsg),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MsgTabType {
LikeMe = 0,
ReplyMe = 1,
AtMe = 2,
SystemMsg = 3,
HuaHuo = 4,
NewFollow = 5,
ReceiveReply = 100,
ReceiveLike = 101,
}
impl MsgTabType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::LikeMe => "LikeMe",
Self::ReplyMe => "ReplyMe",
Self::AtMe => "AtMe",
Self::SystemMsg => "SystemMsg",
Self::HuaHuo => "HuaHuo",
Self::NewFollow => "NewFollow",
Self::ReceiveReply => "ReceiveReply",
Self::ReceiveLike => "ReceiveLike",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LikeMe" => Some(Self::LikeMe),
"ReplyMe" => Some(Self::ReplyMe),
"AtMe" => Some(Self::AtMe),
"SystemMsg" => Some(Self::SystemMsg),
"HuaHuo" => Some(Self::HuaHuo),
"NewFollow" => Some(Self::NewFollow),
"ReceiveReply" => Some(Self::ReceiveReply),
"ReceiveLike" => Some(Self::ReceiveLike),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionsFilterType {
SessionsAll = 0,
SessionsFollowing = 1,
}
impl SessionsFilterType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::SessionsAll => "Sessions_All",
Self::SessionsFollowing => "Sessions_Following",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Sessions_All" => Some(Self::SessionsAll),
"Sessions_Following" => Some(Self::SessionsFollowing),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ToastType {
Default = 0,
Banned = 1,
Report = 2,
}
impl ToastType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "ToastTypeDefault",
Self::Banned => "ToastTypeBanned",
Self::Report => "ToastTypeReport",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ToastTypeDefault" => Some(Self::Default),
"ToastTypeBanned" => Some(Self::Banned),
"ToastTypeReport" => Some(Self::Report),
_ => None,
}
}
}
#[cfg(feature = "feat-enable-generated-client")]
pub mod im_gateway_api_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 ImGatewayApiClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ImGatewayApiClient<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,
) -> ImGatewayApiClient<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,
{
ImGatewayApiClient::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 clear_bubble_msg(
&mut self,
request: impl tonic::IntoRequest<super::ClearBubbleMsgReq>,
) -> std::result::Result<
tonic::Response<super::ClearBubbleMsgRsp>,
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.gateway.interfaces.v1.ImGatewayApi/ClearBubbleMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"ClearBubbleMsg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn clear_message_toast(
&mut self,
request: impl tonic::IntoRequest<super::ClearMessageToastReq>,
) -> std::result::Result<tonic::Response<()>, 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.gateway.interfaces.v1.ImGatewayApi/ClearMessageToast",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"ClearMessageToast",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn del_msg(
&mut self,
request: impl tonic::IntoRequest<super::DelMsgReq>,
) -> std::result::Result<tonic::Response<super::DelMsgRsp>, 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.gateway.interfaces.v1.ImGatewayApi/DelMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"DelMsg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn del_msg_card(
&mut self,
request: impl tonic::IntoRequest<super::DelMsgCardReq>,
) -> std::result::Result<tonic::Response<()>, 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.gateway.interfaces.v1.ImGatewayApi/DelMsgCard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"DelMsgCard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_ai_info(
&mut self,
request: impl tonic::IntoRequest<super::ReqGetAiInfo>,
) -> std::result::Result<tonic::Response<super::RspGetAiInfo>, 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.gateway.interfaces.v1.ImGatewayApi/GetAIInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"GetAIInfo",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_bubble_msg(
&mut self,
request: impl tonic::IntoRequest<super::GetBubbleMsgReq>,
) -> std::result::Result<
tonic::Response<super::GetBubbleMsgRsp>,
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.gateway.interfaces.v1.ImGatewayApi/GetBubbleMsg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"GetBubbleMsg",
),
);
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::super::super::super::interfaces::v1::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.gateway.interfaces.v1.ImGatewayApi/GetSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"GetSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_system_notice(
&mut self,
request: impl tonic::IntoRequest<super::ReqGetSystemNotice>,
) -> std::result::Result<
tonic::Response<super::RspGetSystemNotice>,
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.gateway.interfaces.v1.ImGatewayApi/GetSystemNotice",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"GetSystemNotice",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_total_unread(
&mut self,
request: impl tonic::IntoRequest<super::GetTotalUnreadReq>,
) -> std::result::Result<
tonic::Response<super::GetTotalUnreadRsp>,
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.gateway.interfaces.v1.ImGatewayApi/GetTotalUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"GetTotalUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn harmony_total_unread(
&mut self,
request: impl tonic::IntoRequest<super::GetTotalUnreadReq>,
) -> std::result::Result<
tonic::Response<super::HarmonyTotalUnreadRsp>,
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.gateway.interfaces.v1.ImGatewayApi/HarmonyTotalUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"HarmonyTotalUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn message_toast(
&mut self,
request: impl tonic::IntoRequest<super::MessageToastReq>,
) -> std::result::Result<
tonic::Response<super::MessageToastRsp>,
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.gateway.interfaces.v1.ImGatewayApi/MessageToast",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"MessageToast",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn msg_feed_action(
&mut self,
request: impl tonic::IntoRequest<super::MsgFeedActionReq>,
) -> std::result::Result<
tonic::Response<super::MsgFeedActionRsp>,
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.gateway.interfaces.v1.ImGatewayApi/MsgFeedAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"MsgFeedAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn msg_feed_msg_list(
&mut self,
request: impl tonic::IntoRequest<super::MsgListReq>,
) -> std::result::Result<tonic::Response<super::MsgListRsp>, 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.gateway.interfaces.v1.ImGatewayApi/MsgFeedMsgList",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"MsgFeedMsgList",
),
);
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::super::super::super::interfaces::v1::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.gateway.interfaces.v1.ImGatewayApi/NewSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"NewSessions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn prompt(
&mut self,
request: impl tonic::IntoRequest<super::PromptReq>,
) -> std::result::Result<tonic::Response<super::PromptRsp>, 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.gateway.interfaces.v1.ImGatewayApi/Prompt",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"Prompt",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn quick_link(
&mut self,
request: impl tonic::IntoRequest<super::QuickLinkReq>,
) -> std::result::Result<tonic::Response<super::QuickLinkRsp>, 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.gateway.interfaces.v1.ImGatewayApi/QuickLink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"QuickLink",
),
);
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.gateway.interfaces.v1.ImGatewayApi/RemoveSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"RemoveSession",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_msg_feed_notice(
&mut self,
request: impl tonic::IntoRequest<super::SetMsgFeedNoticeReq>,
) -> std::result::Result<tonic::Response<()>, 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.gateway.interfaces.v1.ImGatewayApi/SetMsgFeedNotice",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"SetMsgFeedNotice",
),
);
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.gateway.interfaces.v1.ImGatewayApi/SetTop",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"SetTop",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn single_inbox(
&mut self,
request: impl tonic::IntoRequest<super::ReqSingleInbox>,
) -> std::result::Result<tonic::Response<super::RspSingleInbox>, 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.gateway.interfaces.v1.ImGatewayApi/SingleInbox",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"SingleInbox",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_total_unread(
&mut self,
request: impl tonic::IntoRequest<()>,
) -> std::result::Result<tonic::Response<()>, 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.gateway.interfaces.v1.ImGatewayApi/UpdateTotalUnread",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"UpdateTotalUnread",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_total_unread_v2(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::interfaces::v1::ReqUpdateTotalUnread,
>,
) -> std::result::Result<tonic::Response<()>, 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.gateway.interfaces.v1.ImGatewayApi/UpdateTotalUnreadV2",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.im.gateway.interfaces.v1.ImGatewayApi",
"UpdateTotalUnreadV2",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "feat-enable-generated-server")]
pub mod im_gateway_api_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait ImGatewayApi: std::marker::Send + std::marker::Sync + 'static {
async fn clear_bubble_msg(
&self,
request: tonic::Request<super::ClearBubbleMsgReq>,
) -> std::result::Result<
tonic::Response<super::ClearBubbleMsgRsp>,
tonic::Status,
>;
async fn clear_message_toast(
&self,
request: tonic::Request<super::ClearMessageToastReq>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
async fn del_msg(
&self,
request: tonic::Request<super::DelMsgReq>,
) -> std::result::Result<tonic::Response<super::DelMsgRsp>, tonic::Status>;
async fn del_msg_card(
&self,
request: tonic::Request<super::DelMsgCardReq>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
async fn get_ai_info(
&self,
request: tonic::Request<super::ReqGetAiInfo>,
) -> std::result::Result<tonic::Response<super::RspGetAiInfo>, tonic::Status>;
async fn get_bubble_msg(
&self,
request: tonic::Request<super::GetBubbleMsgReq>,
) -> std::result::Result<tonic::Response<super::GetBubbleMsgRsp>, tonic::Status>;
async fn get_sessions(
&self,
request: tonic::Request<super::ReqGetSessions>,
) -> std::result::Result<
tonic::Response<super::super::super::super::interfaces::v1::RspSessions>,
tonic::Status,
>;
async fn get_system_notice(
&self,
request: tonic::Request<super::ReqGetSystemNotice>,
) -> std::result::Result<
tonic::Response<super::RspGetSystemNotice>,
tonic::Status,
>;
async fn get_total_unread(
&self,
request: tonic::Request<super::GetTotalUnreadReq>,
) -> std::result::Result<
tonic::Response<super::GetTotalUnreadRsp>,
tonic::Status,
>;
async fn harmony_total_unread(
&self,
request: tonic::Request<super::GetTotalUnreadReq>,
) -> std::result::Result<
tonic::Response<super::HarmonyTotalUnreadRsp>,
tonic::Status,
>;
async fn message_toast(
&self,
request: tonic::Request<super::MessageToastReq>,
) -> std::result::Result<tonic::Response<super::MessageToastRsp>, tonic::Status>;
async fn msg_feed_action(
&self,
request: tonic::Request<super::MsgFeedActionReq>,
) -> std::result::Result<
tonic::Response<super::MsgFeedActionRsp>,
tonic::Status,
>;
async fn msg_feed_msg_list(
&self,
request: tonic::Request<super::MsgListReq>,
) -> std::result::Result<tonic::Response<super::MsgListRsp>, tonic::Status>;
async fn new_sessions(
&self,
request: tonic::Request<super::ReqNewSessions>,
) -> std::result::Result<
tonic::Response<super::super::super::super::interfaces::v1::RspSessions>,
tonic::Status,
>;
async fn prompt(
&self,
request: tonic::Request<super::PromptReq>,
) -> std::result::Result<tonic::Response<super::PromptRsp>, tonic::Status>;
async fn quick_link(
&self,
request: tonic::Request<super::QuickLinkReq>,
) -> std::result::Result<tonic::Response<super::QuickLinkRsp>, tonic::Status>;
async fn remove_session(
&self,
request: tonic::Request<super::ReqRemoveSession>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn set_msg_feed_notice(
&self,
request: tonic::Request<super::SetMsgFeedNoticeReq>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
async fn set_top(
&self,
request: tonic::Request<super::ReqSetTop>,
) -> std::result::Result<tonic::Response<super::DummyRsp>, tonic::Status>;
async fn single_inbox(
&self,
request: tonic::Request<super::ReqSingleInbox>,
) -> std::result::Result<tonic::Response<super::RspSingleInbox>, tonic::Status>;
async fn update_total_unread(
&self,
request: tonic::Request<()>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
async fn update_total_unread_v2(
&self,
request: tonic::Request<
super::super::super::super::interfaces::v1::ReqUpdateTotalUnread,
>,
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
}
#[derive(Debug)]
pub struct ImGatewayApiServer<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> ImGatewayApiServer<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 ImGatewayApiServer<T>
where
T: ImGatewayApi,
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.gateway.interfaces.v1.ImGatewayApi/ClearBubbleMsg" => {
#[allow(non_camel_case_types)]
struct ClearBubbleMsgSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ClearBubbleMsgReq>
for ClearBubbleMsgSvc<T> {
type Response = super::ClearBubbleMsgRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ClearBubbleMsgReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::clear_bubble_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 = ClearBubbleMsgSvc(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.gateway.interfaces.v1.ImGatewayApi/ClearMessageToast" => {
#[allow(non_camel_case_types)]
struct ClearMessageToastSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ClearMessageToastReq>
for ClearMessageToastSvc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ClearMessageToastReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::clear_message_toast(&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 = ClearMessageToastSvc(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.gateway.interfaces.v1.ImGatewayApi/DelMsg" => {
#[allow(non_camel_case_types)]
struct DelMsgSvc<T: ImGatewayApi>(pub Arc<T>);
impl<T: ImGatewayApi> tonic::server::UnaryService<super::DelMsgReq>
for DelMsgSvc<T> {
type Response = super::DelMsgRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DelMsgReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::del_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 = DelMsgSvc(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.gateway.interfaces.v1.ImGatewayApi/DelMsgCard" => {
#[allow(non_camel_case_types)]
struct DelMsgCardSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::DelMsgCardReq>
for DelMsgCardSvc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DelMsgCardReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::del_msg_card(&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 = DelMsgCardSvc(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.gateway.interfaces.v1.ImGatewayApi/GetAIInfo" => {
#[allow(non_camel_case_types)]
struct GetAIInfoSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ReqGetAiInfo>
for GetAIInfoSvc<T> {
type Response = super::RspGetAiInfo;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGetAiInfo>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::get_ai_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 = GetAIInfoSvc(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.gateway.interfaces.v1.ImGatewayApi/GetBubbleMsg" => {
#[allow(non_camel_case_types)]
struct GetBubbleMsgSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::GetBubbleMsgReq>
for GetBubbleMsgSvc<T> {
type Response = super::GetBubbleMsgRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetBubbleMsgReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::get_bubble_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 = GetBubbleMsgSvc(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.gateway.interfaces.v1.ImGatewayApi/GetSessions" => {
#[allow(non_camel_case_types)]
struct GetSessionsSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ReqGetSessions>
for GetSessionsSvc<T> {
type Response = super::super::super::super::interfaces::v1::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 ImGatewayApi>::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.gateway.interfaces.v1.ImGatewayApi/GetSystemNotice" => {
#[allow(non_camel_case_types)]
struct GetSystemNoticeSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ReqGetSystemNotice>
for GetSystemNoticeSvc<T> {
type Response = super::RspGetSystemNotice;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqGetSystemNotice>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::get_system_notice(&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 = GetSystemNoticeSvc(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.gateway.interfaces.v1.ImGatewayApi/GetTotalUnread" => {
#[allow(non_camel_case_types)]
struct GetTotalUnreadSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::GetTotalUnreadReq>
for GetTotalUnreadSvc<T> {
type Response = super::GetTotalUnreadRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTotalUnreadReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::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.gateway.interfaces.v1.ImGatewayApi/HarmonyTotalUnread" => {
#[allow(non_camel_case_types)]
struct HarmonyTotalUnreadSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::GetTotalUnreadReq>
for HarmonyTotalUnreadSvc<T> {
type Response = super::HarmonyTotalUnreadRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTotalUnreadReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::harmony_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 = HarmonyTotalUnreadSvc(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.gateway.interfaces.v1.ImGatewayApi/MessageToast" => {
#[allow(non_camel_case_types)]
struct MessageToastSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::MessageToastReq>
for MessageToastSvc<T> {
type Response = super::MessageToastRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MessageToastReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::message_toast(&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 = MessageToastSvc(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.gateway.interfaces.v1.ImGatewayApi/MsgFeedAction" => {
#[allow(non_camel_case_types)]
struct MsgFeedActionSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::MsgFeedActionReq>
for MsgFeedActionSvc<T> {
type Response = super::MsgFeedActionRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgFeedActionReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::msg_feed_action(&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 = MsgFeedActionSvc(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.gateway.interfaces.v1.ImGatewayApi/MsgFeedMsgList" => {
#[allow(non_camel_case_types)]
struct MsgFeedMsgListSvc<T: ImGatewayApi>(pub Arc<T>);
impl<T: ImGatewayApi> tonic::server::UnaryService<super::MsgListReq>
for MsgFeedMsgListSvc<T> {
type Response = super::MsgListRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgListReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::msg_feed_msg_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 = MsgFeedMsgListSvc(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.gateway.interfaces.v1.ImGatewayApi/NewSessions" => {
#[allow(non_camel_case_types)]
struct NewSessionsSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ReqNewSessions>
for NewSessionsSvc<T> {
type Response = super::super::super::super::interfaces::v1::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 ImGatewayApi>::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.gateway.interfaces.v1.ImGatewayApi/Prompt" => {
#[allow(non_camel_case_types)]
struct PromptSvc<T: ImGatewayApi>(pub Arc<T>);
impl<T: ImGatewayApi> tonic::server::UnaryService<super::PromptReq>
for PromptSvc<T> {
type Response = super::PromptRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::PromptReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::prompt(&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 = PromptSvc(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.gateway.interfaces.v1.ImGatewayApi/QuickLink" => {
#[allow(non_camel_case_types)]
struct QuickLinkSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::QuickLinkReq>
for QuickLinkSvc<T> {
type Response = super::QuickLinkRsp;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QuickLinkReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::quick_link(&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 = QuickLinkSvc(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.gateway.interfaces.v1.ImGatewayApi/RemoveSession" => {
#[allow(non_camel_case_types)]
struct RemoveSessionSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> 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 ImGatewayApi>::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.gateway.interfaces.v1.ImGatewayApi/SetMsgFeedNotice" => {
#[allow(non_camel_case_types)]
struct SetMsgFeedNoticeSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::SetMsgFeedNoticeReq>
for SetMsgFeedNoticeSvc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetMsgFeedNoticeReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::set_msg_feed_notice(&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 = SetMsgFeedNoticeSvc(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.gateway.interfaces.v1.ImGatewayApi/SetTop" => {
#[allow(non_camel_case_types)]
struct SetTopSvc<T: ImGatewayApi>(pub Arc<T>);
impl<T: ImGatewayApi> 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 ImGatewayApi>::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.gateway.interfaces.v1.ImGatewayApi/SingleInbox" => {
#[allow(non_camel_case_types)]
struct SingleInboxSvc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<super::ReqSingleInbox>
for SingleInboxSvc<T> {
type Response = super::RspSingleInbox;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReqSingleInbox>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::single_inbox(&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 = SingleInboxSvc(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.gateway.interfaces.v1.ImGatewayApi/UpdateTotalUnread" => {
#[allow(non_camel_case_types)]
struct UpdateTotalUnreadSvc<T: ImGatewayApi>(pub Arc<T>);
impl<T: ImGatewayApi> tonic::server::UnaryService<()>
for UpdateTotalUnreadSvc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(&mut self, request: tonic::Request<()>) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::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.gateway.interfaces.v1.ImGatewayApi/UpdateTotalUnreadV2" => {
#[allow(non_camel_case_types)]
struct UpdateTotalUnreadV2Svc<T: ImGatewayApi>(pub Arc<T>);
impl<
T: ImGatewayApi,
> tonic::server::UnaryService<
super::super::super::super::interfaces::v1::ReqUpdateTotalUnread,
> for UpdateTotalUnreadV2Svc<T> {
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::super::super::super::interfaces::v1::ReqUpdateTotalUnread,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ImGatewayApi>::update_total_unread_v2(&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 = UpdateTotalUnreadV2Svc(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 ImGatewayApiServer<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.gateway.interfaces.v1.ImGatewayApi";
impl<T> tonic::server::NamedService for ImGatewayApiServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}