#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Emote {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub jump_url: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub jump_title: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub id: i64,
#[prost(int64, tag = "6")]
pub package_id: i64,
#[prost(string, tag = "7")]
pub gif_url: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub text: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub webp_url: ::prost::alloc::string::String,
}
impl ::prost::Name for Emote {
const NAME: &'static str = "Emote";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.Emote".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.Emote".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmptyPage {
#[prost(string, tag = "1")]
pub image_url: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub texts: ::prost::alloc::vec::Vec<empty_page::Text>,
#[prost(message, optional, tag = "3")]
pub left_button: ::core::option::Option<empty_page::Button>,
#[prost(message, optional, tag = "4")]
pub right_button: ::core::option::Option<empty_page::Button>,
}
pub mod empty_page {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Button {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(enumeration = "Action", tag = "2")]
pub action: i32,
}
impl ::prost::Name for Button {
const NAME: &'static str = "Button";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.EmptyPage.Button".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.EmptyPage.Button".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Text {
#[prost(string, tag = "1")]
pub raw: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub style: ::core::option::Option<super::TextStyle>,
#[prost(enumeration = "Action", tag = "3")]
pub action: i32,
}
impl ::prost::Name for Text {
const NAME: &'static str = "Text";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.EmptyPage.Text".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.EmptyPage.Text".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Action {
Unavailable = 0,
ShowKeyboard = 1,
SendReplyWithBoldText = 2,
}
impl Action {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unavailable => "UNAVAILABLE",
Self::ShowKeyboard => "SHOW_KEYBOARD",
Self::SendReplyWithBoldText => "SEND_REPLY_WITH_BOLD_TEXT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNAVAILABLE" => Some(Self::Unavailable),
"SHOW_KEYBOARD" => Some(Self::ShowKeyboard),
"SEND_REPLY_WITH_BOLD_TEXT" => Some(Self::SendReplyWithBoldText),
_ => None,
}
}
}
}
impl ::prost::Name for EmptyPage {
const NAME: &'static str = "EmptyPage";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.EmptyPage".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.EmptyPage".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuideText {
#[prost(message, repeated, tag = "1")]
pub texts: ::prost::alloc::vec::Vec<guide_text::Text>,
}
pub mod guide_text {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Text {
#[prost(string, tag = "1")]
pub raw: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub style: ::core::option::Option<super::TextStyle>,
#[prost(string, tag = "3")]
pub link: ::prost::alloc::string::String,
}
impl ::prost::Name for Text {
const NAME: &'static str = "Text";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.GuideText.Text".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.GuideText.Text".into()
}
}
}
impl ::prost::Name for GuideText {
const NAME: &'static str = "GuideText";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.GuideText".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.GuideText".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PlayerParams {
#[prost(bool, tag = "1")]
pub is_story: bool,
#[prost(bool, tag = "2")]
pub disable_filter_tag: bool,
}
impl ::prost::Name for PlayerParams {
const NAME: &'static str = "PlayerParams";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.PlayerParams".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.PlayerParams".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
#[prost(enumeration = "resource::BizKind", tag = "1")]
pub biz_kind: i32,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
}
pub mod resource {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BizKind {
Unknown = 0,
LikeSuccess = 1,
ReplySuccess = 2,
ReplyEasterEgg = 3,
}
impl BizKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "UNKNOWN",
Self::LikeSuccess => "LIKE_SUCCESS",
Self::ReplySuccess => "REPLY_SUCCESS",
Self::ReplyEasterEgg => "REPLY_EASTER_EGG",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"LIKE_SUCCESS" => Some(Self::LikeSuccess),
"REPLY_SUCCESS" => Some(Self::ReplySuccess),
"REPLY_EASTER_EGG" => Some(Self::ReplyEasterEgg),
_ => None,
}
}
}
}
impl ::prost::Name for Resource {
const NAME: &'static str = "Resource";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.Resource".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.Resource".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectDescriptionReply {
#[prost(int64, tag = "1")]
pub count: i64,
#[prost(message, optional, tag = "2")]
pub input: ::core::option::Option<subject_description_reply::InputConfig>,
#[prost(message, optional, tag = "3")]
pub emote: ::core::option::Option<subject_description_reply::EmoteConfig>,
#[prost(message, optional, tag = "4")]
pub empty_page: ::core::option::Option<EmptyPage>,
#[prost(message, repeated, tag = "5")]
pub support_filter_tags: ::prost::alloc::vec::Vec<
subject_description_reply::FilterTag,
>,
#[prost(string, repeated, tag = "6")]
pub preload_res_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "7")]
pub user_callbacks: ::prost::alloc::vec::Vec<UserCallback>,
#[prost(int64, tag = "8")]
pub up_mid: i64,
#[prost(message, repeated, tag = "9")]
pub preload_resources: ::prost::alloc::vec::Vec<Resource>,
#[prost(bool, tag = "10")]
pub guest_limit: bool,
#[prost(message, optional, tag = "11")]
pub filter_guide_text: ::core::option::Option<GuideText>,
}
pub mod subject_description_reply {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmoteConfig {
#[prost(bool, tag = "1")]
pub jump_emote_disabled: bool,
#[prost(message, repeated, tag = "2")]
pub suggest_emotes: ::prost::alloc::vec::Vec<super::Emote>,
}
impl ::prost::Name for EmoteConfig {
const NAME: &'static str = "EmoteConfig";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.EmoteConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.EmoteConfig"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilterTag {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub event_id: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub support_pic_list: bool,
}
impl ::prost::Name for FilterTag {
const NAME: &'static str = "FilterTag";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.FilterTag".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.FilterTag".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputConfig {
#[prost(bool, tag = "1")]
pub disabled: bool,
#[prost(string, tag = "2")]
pub root_text: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub child_text: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub give_up_text: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub editor_icon_config: ::core::option::Option<input_config::EditorIconConfig>,
#[prost(message, optional, tag = "6")]
pub grade_panel: ::core::option::Option<input_config::GradePanel>,
#[prost(message, optional, tag = "7")]
pub func_buttons: ::core::option::Option<input_config::FunctionButtonGroup>,
}
pub mod input_config {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EditorIconConfig {
#[prost(enumeration = "super::super::EditorIconState", tag = "1")]
pub screenshot_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "2")]
pub upload_picture_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "3")]
pub vote_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "4")]
pub note_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "5")]
pub goods_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "6")]
pub insert_content_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "7")]
pub elec_icon_state: i32,
#[prost(enumeration = "super::super::EditorIconState", tag = "8")]
pub cm_biz_helper_icon_state: i32,
}
impl ::prost::Name for EditorIconConfig {
const NAME: &'static str = "EditorIconConfig";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.EditorIconConfig"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.EditorIconConfig"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionButton {
#[prost(enumeration = "super::super::FunctionButtonType", tag = "1")]
pub r#type: i32,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "super::super::EditorIconState", tag = "3")]
pub state: i32,
#[prost(string, tag = "4")]
pub link: ::prost::alloc::string::String,
}
impl ::prost::Name for FunctionButton {
const NAME: &'static str = "FunctionButton";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.FunctionButton"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.FunctionButton"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionButtonGroup {
#[prost(message, repeated, tag = "1")]
pub buttons: ::prost::alloc::vec::Vec<FunctionButton>,
}
impl ::prost::Name for FunctionButtonGroup {
const NAME: &'static str = "FunctionButtonGroup";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.FunctionButtonGroup"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.FunctionButtonGroup"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GradePanel {
#[prost(string, tag = "1")]
pub prompt_text: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub grades: ::prost::alloc::vec::Vec<grade_panel::Grade>,
#[prost(message, repeated, tag = "3")]
pub cid_grade_groups: ::prost::alloc::vec::Vec<grade_panel::CidGradeGroup>,
#[prost(message, optional, tag = "4")]
pub single_grade: ::core::option::Option<grade_panel::Grade>,
}
pub mod grade_panel {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CidGradeGroup {
#[prost(int64, tag = "1")]
pub cid: i64,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub grades: ::prost::alloc::vec::Vec<Grade>,
}
impl ::prost::Name for CidGradeGroup {
const NAME: &'static str = "CidGradeGroup";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.GradePanel.CidGradeGroup"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.GradePanel.CidGradeGroup"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Grade {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(string, tag = "2")]
pub image: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub default_score: ::core::option::Option<i32>,
#[prost(bool, tag = "5")]
pub disable_zero: bool,
#[prost(string, tag = "6")]
pub grade_prompt: ::prost::alloc::string::String,
}
impl ::prost::Name for Grade {
const NAME: &'static str = "Grade";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.GradePanel.Grade"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.GradePanel.Grade"
.into()
}
}
}
impl ::prost::Name for GradePanel {
const NAME: &'static str = "GradePanel";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.GradePanel"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig.GradePanel"
.into()
}
}
}
impl ::prost::Name for InputConfig {
const NAME: &'static str = "InputConfig";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply.InputConfig"
.into()
}
}
}
impl ::prost::Name for SubjectDescriptionReply {
const NAME: &'static str = "SubjectDescriptionReply";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReply".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SubjectDescriptionReq {
#[prost(message, optional, tag = "1")]
pub subject_id: ::core::option::Option<SubjectId>,
#[prost(message, optional, tag = "2")]
pub player_params: ::core::option::Option<PlayerParams>,
}
impl ::prost::Name for SubjectDescriptionReq {
const NAME: &'static str = "SubjectDescriptionReq";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectDescriptionReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectDescriptionReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SubjectId {
#[prost(int64, tag = "1")]
pub oid: i64,
#[prost(int64, tag = "2")]
pub r#type: i64,
}
impl ::prost::Name for SubjectId {
const NAME: &'static str = "SubjectID";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.SubjectID".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.SubjectID".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextStyle {
#[prost(int32, tag = "1")]
pub font_size: i32,
#[prost(enumeration = "text_style::FontStyle", tag = "2")]
pub font_style: i32,
#[prost(string, tag = "3")]
pub text_day_color: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub text_night_color: ::prost::alloc::string::String,
}
pub mod text_style {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FontStyle {
Normal = 0,
Bold = 1,
}
impl FontStyle {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Normal => "NORMAL",
Self::Bold => "BOLD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NORMAL" => Some(Self::Normal),
"BOLD" => Some(Self::Bold),
_ => None,
}
}
}
}
impl ::prost::Name for TextStyle {
const NAME: &'static str = "TextStyle";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.TextStyle".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.TextStyle".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserCallback {
#[prost(enumeration = "UserCallbackScene", tag = "1")]
pub scene: i32,
#[prost(enumeration = "UserCallbackAction", tag = "2")]
pub action: i32,
}
impl ::prost::Name for UserCallback {
const NAME: &'static str = "UserCallback";
const PACKAGE: &'static str = "bilibili.main.community.reply.v2";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.main.community.reply.v2.UserCallback".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.main.community.reply.v2.UserCallback".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EditorIconState {
Default = 0,
Enable = 1,
Disable = 2,
Hide = 3,
}
impl EditorIconState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "EditorIconState_DEFAULT",
Self::Enable => "EditorIconState_ENABLE",
Self::Disable => "EditorIconState_DISABLE",
Self::Hide => "EditorIconState_HIDE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EditorIconState_DEFAULT" => Some(Self::Default),
"EditorIconState_ENABLE" => Some(Self::Enable),
"EditorIconState_DISABLE" => Some(Self::Disable),
"EditorIconState_HIDE" => Some(Self::Hide),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FunctionButtonType {
Default = 0,
Screenshot = 1,
UploadPicture = 2,
Vote = 3,
Note = 4,
Goods = 5,
InsertContent = 6,
Elec = 7,
CmBizHelper = 8,
}
impl FunctionButtonType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "FunctionButtonType_DEFAULT",
Self::Screenshot => "FunctionButtonType_Screenshot",
Self::UploadPicture => "FunctionButtonType_UploadPicture",
Self::Vote => "FunctionButtonType_Vote",
Self::Note => "FunctionButtonType_Note",
Self::Goods => "FunctionButtonType_Goods",
Self::InsertContent => "FunctionButtonType_InsertContent",
Self::Elec => "FunctionButtonType_Elec",
Self::CmBizHelper => "FunctionButtonType_CMBizHelper",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FunctionButtonType_DEFAULT" => Some(Self::Default),
"FunctionButtonType_Screenshot" => Some(Self::Screenshot),
"FunctionButtonType_UploadPicture" => Some(Self::UploadPicture),
"FunctionButtonType_Vote" => Some(Self::Vote),
"FunctionButtonType_Note" => Some(Self::Note),
"FunctionButtonType_Goods" => Some(Self::Goods),
"FunctionButtonType_InsertContent" => Some(Self::InsertContent),
"FunctionButtonType_Elec" => Some(Self::Elec),
"FunctionButtonType_CMBizHelper" => Some(Self::CmBizHelper),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UserCallbackAction {
Default = 0,
Dismiss = 1,
}
impl UserCallbackAction {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "USER_CALLBACK_ACTION_DEFAULT",
Self::Dismiss => "USER_CALLBACK_ACTION_DISMISS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"USER_CALLBACK_ACTION_DEFAULT" => Some(Self::Default),
"USER_CALLBACK_ACTION_DISMISS" => Some(Self::Dismiss),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UserCallbackScene {
Default = 0,
Insert = 1,
RecommendSuperbReply = 2,
}
impl UserCallbackScene {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "USER_CALLBACK_SCENE_DEFAULT",
Self::Insert => "USER_CALLBACK_SCENE_INSERT",
Self::RecommendSuperbReply => "USER_CALLBACK_SCENE_RECOMMEND_SUPERB_REPLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"USER_CALLBACK_SCENE_DEFAULT" => Some(Self::Default),
"USER_CALLBACK_SCENE_INSERT" => Some(Self::Insert),
"USER_CALLBACK_SCENE_RECOMMEND_SUPERB_REPLY" => {
Some(Self::RecommendSuperbReply)
}
_ => None,
}
}
}
#[cfg(feature = "feat-enable-generated-client")]
pub mod reply_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 ReplyClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReplyClient<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,
) -> ReplyClient<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,
{
ReplyClient::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 subject_description(
&mut self,
request: impl tonic::IntoRequest<super::SubjectDescriptionReq>,
) -> std::result::Result<
tonic::Response<super::SubjectDescriptionReply>,
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.main.community.reply.v2.Reply/SubjectDescription",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.main.community.reply.v2.Reply",
"SubjectDescription",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "feat-enable-generated-server")]
pub mod reply_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Reply: std::marker::Send + std::marker::Sync + 'static {
async fn subject_description(
&self,
request: tonic::Request<super::SubjectDescriptionReq>,
) -> std::result::Result<
tonic::Response<super::SubjectDescriptionReply>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ReplyServer<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> ReplyServer<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 ReplyServer<T>
where
T: Reply,
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.main.community.reply.v2.Reply/SubjectDescription" => {
#[allow(non_camel_case_types)]
struct SubjectDescriptionSvc<T: Reply>(pub Arc<T>);
impl<
T: Reply,
> tonic::server::UnaryService<super::SubjectDescriptionReq>
for SubjectDescriptionSvc<T> {
type Response = super::SubjectDescriptionReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SubjectDescriptionReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Reply>::subject_description(&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 = SubjectDescriptionSvc(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 ReplyServer<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.main.community.reply.v2.Reply";
impl<T> tonic::server::NamedService for ReplyServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}