#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelRedirectReply {
#[prost(int64, tag = "1")]
pub code: i64,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
}
impl ::prost::Name for ChannelRedirectReply {
const NAME: &'static str = "ChannelRedirectReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.ChannelRedirectReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.ChannelRedirectReply".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ChannelRedirectReq {
#[prost(int64, tag = "1")]
pub id: i64,
}
impl ::prost::Name for ChannelRedirectReq {
const NAME: &'static str = "ChannelRedirectReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.ChannelRedirectReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.ChannelRedirectReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ClarityReply {
#[prost(bool, tag = "1")]
pub is_play_story: bool,
#[prost(bool, tag = "2")]
pub is_set_play_qn: bool,
#[prost(int64, tag = "3")]
pub last_play_qn_value: i64,
}
impl ::prost::Name for ClarityReply {
const NAME: &'static str = "ClarityReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.ClarityReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.ClarityReply".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ClarityReq {}
impl ::prost::Name for ClarityReq {
const NAME: &'static str = "ClarityReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.ClarityReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.ClarityReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EmptyReply {}
impl ::prost::Name for EmptyReply {
const NAME: &'static str = "EmptyReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.EmptyReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.EmptyReply".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuideCard {
#[prost(string, tag = "1")]
pub image: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subtitle: ::prost::alloc::string::String,
}
impl ::prost::Name for GuideCard {
const NAME: &'static str = "GuideCard";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.GuideCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.GuideCard".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuideItem {
#[prost(message, repeated, tag = "1")]
pub card: ::prost::alloc::vec::Vec<GuideCard>,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
impl ::prost::Name for GuideItem {
const NAME: &'static str = "GuideItem";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.GuideItem".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.GuideItem".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuideTip {
#[prost(string, tag = "1")]
pub image: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subtitle: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
}
impl ::prost::Name for GuideTip {
const NAME: &'static str = "GuideTip";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.GuideTip".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.GuideTip".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RcmdReason {
#[prost(string, tag = "1")]
pub content: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub corner_mark: i32,
}
impl ::prost::Name for RcmdReason {
const NAME: &'static str = "RcmdReason";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RcmdReason".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RcmdReason".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionAv {
#[prost(string, tag = "1")]
pub cover: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cover_view_text: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cover_dm_text: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub cover_right_text1: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub jump_url: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub up_name: ::prost::alloc::string::String,
#[prost(int64, tag = "7")]
pub aid: i64,
#[prost(string, tag = "8")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub cover43: ::prost::alloc::string::String,
}
impl ::prost::Name for RegionAv {
const NAME: &'static str = "RegionAv";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionAv".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionAv".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionBanner {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub sub_title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub url: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub index: i64,
#[prost(string, tag = "5")]
pub cover: ::prost::alloc::string::String,
#[prost(int64, tag = "6")]
pub id: i64,
}
impl ::prost::Name for RegionBanner {
const NAME: &'static str = "RegionBanner";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionBanner".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionBanner".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionCard {
#[prost(enumeration = "RegionCardType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub three_point: ::core::option::Option<ThreePoint>,
#[prost(oneof = "region_card::Item", tags = "2")]
pub item: ::core::option::Option<region_card::Item>,
}
pub mod region_card {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Item {
#[prost(message, tag = "2")]
Av(super::RegionAv),
}
}
impl ::prost::Name for RegionCard {
const NAME: &'static str = "RegionCard";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionCard".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionCard".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionContent {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub icons: ::prost::alloc::vec::Vec<RegionIcon>,
}
impl ::prost::Name for RegionContent {
const NAME: &'static str = "RegionContent";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionContent".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionContent".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionIcon {
#[prost(string, tag = "1")]
pub img: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub url: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub unique_id: i64,
#[prost(int64, tag = "5")]
pub rid: i64,
}
impl ::prost::Name for RegionIcon {
const NAME: &'static str = "RegionIcon";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionIcon".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionIcon".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionIndexReply {
#[prost(message, repeated, tag = "1")]
pub banner: ::prost::alloc::vec::Vec<RegionBanner>,
#[prost(bool, tag = "2")]
pub has_next: bool,
#[prost(message, repeated, tag = "3")]
pub cards: ::prost::alloc::vec::Vec<RegionCard>,
#[prost(string, tag = "4")]
pub title: ::prost::alloc::string::String,
}
impl ::prost::Name for RegionIndexReply {
const NAME: &'static str = "RegionIndexReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionIndexReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionIndexReply".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionIndexReq {
#[prost(int64, tag = "1")]
pub rid: i64,
#[prost(int32, tag = "2")]
pub display_id: i32,
#[prost(bool, tag = "3")]
pub need_banner: bool,
#[prost(message, optional, tag = "4")]
pub player_args: ::core::option::Option<
super::super::super::archive::middleware::v1::PlayerArgs,
>,
#[prost(string, tag = "5")]
pub uuid: ::prost::alloc::string::String,
}
impl ::prost::Name for RegionIndexReq {
const NAME: &'static str = "RegionIndexReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionIndexReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionIndexReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionLimit {
#[prost(enumeration = "RegionLimitCode", tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
impl ::prost::Name for RegionLimit {
const NAME: &'static str = "RegionLimit";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionLimit".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionLimit".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionListReply {
#[prost(message, optional, tag = "1")]
pub shortcut: ::core::option::Option<RegionContent>,
#[prost(message, repeated, tag = "2")]
pub contents: ::prost::alloc::vec::Vec<RegionContent>,
}
impl ::prost::Name for RegionListReply {
const NAME: &'static str = "RegionListReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionListReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionListReply".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RegionListReq {}
impl ::prost::Name for RegionListReq {
const NAME: &'static str = "RegionListReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionListReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionListReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionShortcutReply {
#[prost(message, optional, tag = "1")]
pub limit: ::core::option::Option<RegionLimit>,
}
impl ::prost::Name for RegionShortcutReply {
const NAME: &'static str = "RegionShortcutReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionShortcutReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionShortcutReply".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionShortcutReq {
#[prost(int64, repeated, tag = "1")]
pub unique_id: ::prost::alloc::vec::Vec<i64>,
}
impl ::prost::Name for RegionShortcutReq {
const NAME: &'static str = "RegionShortcutReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.RegionShortcutReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.RegionShortcutReq".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ThreePoint {
#[prost(bool, tag = "1")]
pub watch_later: bool,
}
impl ::prost::Name for ThreePoint {
const NAME: &'static str = "ThreePoint";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.ThreePoint".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.ThreePoint".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetGuideReply {
#[prost(int32, tag = "1")]
pub code: i32,
#[prost(message, optional, tag = "2")]
pub guide_item: ::core::option::Option<GuideItem>,
#[prost(message, optional, tag = "3")]
pub tip: ::core::option::Option<GuideTip>,
}
impl ::prost::Name for WidgetGuideReply {
const NAME: &'static str = "WidgetGuideReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.WidgetGuideReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.WidgetGuideReply".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetGuideReq {
#[prost(string, tag = "1")]
pub from_spmid: ::prost::alloc::string::String,
#[prost(enumeration = "GuideType", tag = "2")]
pub guide_type: i32,
#[prost(int64, tag = "3")]
pub up_mid: i64,
#[prost(enumeration = "GuideStyleVersion", tag = "4")]
pub guide_style_version: i32,
#[prost(bool, tag = "5")]
pub skip_update: bool,
}
impl ::prost::Name for WidgetGuideReq {
const NAME: &'static str = "WidgetGuideReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.WidgetGuideReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.WidgetGuideReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetGuideUpdateReq {
#[prost(string, tag = "1")]
pub from_spmid: ::prost::alloc::string::String,
#[prost(enumeration = "GuideType", tag = "2")]
pub guide_type: i32,
}
impl ::prost::Name for WidgetGuideUpdateReq {
const NAME: &'static str = "WidgetGuideUpdateReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.WidgetGuideUpdateReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.WidgetGuideUpdateReq".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetItem {
#[prost(string, tag = "1")]
pub cover: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub view: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub rcmd_reason: ::core::option::Option<RcmdReason>,
#[prost(string, tag = "4")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub uri: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub goto: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub id: i64,
#[prost(int32, tag = "9")]
pub view_icon: i32,
}
impl ::prost::Name for WidgetItem {
const NAME: &'static str = "WidgetItem";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.WidgetItem".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.WidgetItem".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetReply {
#[prost(message, repeated, tag = "1")]
pub item: ::prost::alloc::vec::Vec<WidgetItem>,
}
impl ::prost::Name for WidgetReply {
const NAME: &'static str = "WidgetReply";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.WidgetReply".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.WidgetReply".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetReq {
#[prost(string, tag = "1")]
pub from_spmid: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_no: i32,
}
impl ::prost::Name for WidgetReq {
const NAME: &'static str = "WidgetReq";
const PACKAGE: &'static str = "bilibili.app.show.mixture.v1";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.app.show.mixture.v1.WidgetReq".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.app.show.mixture.v1.WidgetReq".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GuideStyleVersion {
GuideStyleDefault = 0,
GuideStyleFuncNew = 1,
}
impl GuideStyleVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::GuideStyleDefault => "GUIDE_STYLE_DEFAULT",
Self::GuideStyleFuncNew => "GUIDE_STYLE_FUNC_NEW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GUIDE_STYLE_DEFAULT" => Some(Self::GuideStyleDefault),
"GUIDE_STYLE_FUNC_NEW" => Some(Self::GuideStyleFuncNew),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GuideType {
Default = 0,
Func = 1,
}
impl GuideType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "GUIDE_TYPE_DEFAULT",
Self::Func => "GUIDE_TYPE_FUNC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GUIDE_TYPE_DEFAULT" => Some(Self::Default),
"GUIDE_TYPE_FUNC" => Some(Self::Func),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RegionCardType {
Default = 0,
Av = 1,
}
impl RegionCardType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "REGION_CARD_TYPE_DEFAULT",
Self::Av => "REGION_CARD_TYPE_AV",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REGION_CARD_TYPE_DEFAULT" => Some(Self::Default),
"REGION_CARD_TYPE_AV" => Some(Self::Av),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RegionLimitCode {
Default = 0,
NoLogin = 1,
Max = 2,
Error = 3,
}
impl RegionLimitCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "REGION_LIMIT_CODE_DEFAULT",
Self::NoLogin => "REGION_LIMIT_CODE_NO_LOGIN",
Self::Max => "REGION_LIMIT_CODE_MAX",
Self::Error => "REGION_LIMIT_CODE_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REGION_LIMIT_CODE_DEFAULT" => Some(Self::Default),
"REGION_LIMIT_CODE_NO_LOGIN" => Some(Self::NoLogin),
"REGION_LIMIT_CODE_MAX" => Some(Self::Max),
"REGION_LIMIT_CODE_ERROR" => Some(Self::Error),
_ => None,
}
}
}
#[cfg(feature = "feat-enable-generated-client")]
pub mod mixture_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 MixtureClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MixtureClient<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,
) -> MixtureClient<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,
{
MixtureClient::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 channel_redirect(
&mut self,
request: impl tonic::IntoRequest<super::ChannelRedirectReq>,
) -> std::result::Result<
tonic::Response<super::ChannelRedirectReply>,
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.app.show.mixture.v1.Mixture/ChannelRedirect",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.app.show.mixture.v1.Mixture",
"ChannelRedirect",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn clarity(
&mut self,
request: impl tonic::IntoRequest<super::ClarityReq>,
) -> std::result::Result<tonic::Response<super::ClarityReply>, 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.app.show.mixture.v1.Mixture/Clarity",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.app.show.mixture.v1.Mixture", "Clarity"),
);
self.inner.unary(req, path, codec).await
}
pub async fn region_index(
&mut self,
request: impl tonic::IntoRequest<super::RegionIndexReq>,
) -> std::result::Result<
tonic::Response<super::RegionIndexReply>,
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.app.show.mixture.v1.Mixture/RegionIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.app.show.mixture.v1.Mixture",
"RegionIndex",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn region_list(
&mut self,
request: impl tonic::IntoRequest<super::RegionListReq>,
) -> std::result::Result<
tonic::Response<super::RegionListReply>,
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.app.show.mixture.v1.Mixture/RegionList",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.app.show.mixture.v1.Mixture", "RegionList"),
);
self.inner.unary(req, path, codec).await
}
pub async fn region_shortcut(
&mut self,
request: impl tonic::IntoRequest<super::RegionShortcutReq>,
) -> std::result::Result<
tonic::Response<super::RegionShortcutReply>,
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.app.show.mixture.v1.Mixture/RegionShortcut",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.app.show.mixture.v1.Mixture",
"RegionShortcut",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn widget(
&mut self,
request: impl tonic::IntoRequest<super::WidgetReq>,
) -> std::result::Result<tonic::Response<super::WidgetReply>, 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.app.show.mixture.v1.Mixture/Widget",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("bilibili.app.show.mixture.v1.Mixture", "Widget"),
);
self.inner.unary(req, path, codec).await
}
pub async fn widget_guide(
&mut self,
request: impl tonic::IntoRequest<super::WidgetGuideReq>,
) -> std::result::Result<
tonic::Response<super::WidgetGuideReply>,
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.app.show.mixture.v1.Mixture/WidgetGuide",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.app.show.mixture.v1.Mixture",
"WidgetGuide",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn widget_guide_update(
&mut self,
request: impl tonic::IntoRequest<super::WidgetGuideUpdateReq>,
) -> std::result::Result<tonic::Response<super::EmptyReply>, 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.app.show.mixture.v1.Mixture/WidgetGuideUpdate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"bilibili.app.show.mixture.v1.Mixture",
"WidgetGuideUpdate",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "feat-enable-generated-server")]
pub mod mixture_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Mixture: std::marker::Send + std::marker::Sync + 'static {
async fn channel_redirect(
&self,
request: tonic::Request<super::ChannelRedirectReq>,
) -> std::result::Result<
tonic::Response<super::ChannelRedirectReply>,
tonic::Status,
>;
async fn clarity(
&self,
request: tonic::Request<super::ClarityReq>,
) -> std::result::Result<tonic::Response<super::ClarityReply>, tonic::Status>;
async fn region_index(
&self,
request: tonic::Request<super::RegionIndexReq>,
) -> std::result::Result<
tonic::Response<super::RegionIndexReply>,
tonic::Status,
>;
async fn region_list(
&self,
request: tonic::Request<super::RegionListReq>,
) -> std::result::Result<tonic::Response<super::RegionListReply>, tonic::Status>;
async fn region_shortcut(
&self,
request: tonic::Request<super::RegionShortcutReq>,
) -> std::result::Result<
tonic::Response<super::RegionShortcutReply>,
tonic::Status,
>;
async fn widget(
&self,
request: tonic::Request<super::WidgetReq>,
) -> std::result::Result<tonic::Response<super::WidgetReply>, tonic::Status>;
async fn widget_guide(
&self,
request: tonic::Request<super::WidgetGuideReq>,
) -> std::result::Result<
tonic::Response<super::WidgetGuideReply>,
tonic::Status,
>;
async fn widget_guide_update(
&self,
request: tonic::Request<super::WidgetGuideUpdateReq>,
) -> std::result::Result<tonic::Response<super::EmptyReply>, tonic::Status>;
}
#[derive(Debug)]
pub struct MixtureServer<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> MixtureServer<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 MixtureServer<T>
where
T: Mixture,
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.app.show.mixture.v1.Mixture/ChannelRedirect" => {
#[allow(non_camel_case_types)]
struct ChannelRedirectSvc<T: Mixture>(pub Arc<T>);
impl<
T: Mixture,
> tonic::server::UnaryService<super::ChannelRedirectReq>
for ChannelRedirectSvc<T> {
type Response = super::ChannelRedirectReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ChannelRedirectReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::channel_redirect(&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 = ChannelRedirectSvc(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.app.show.mixture.v1.Mixture/Clarity" => {
#[allow(non_camel_case_types)]
struct ClaritySvc<T: Mixture>(pub Arc<T>);
impl<T: Mixture> tonic::server::UnaryService<super::ClarityReq>
for ClaritySvc<T> {
type Response = super::ClarityReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ClarityReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::clarity(&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 = ClaritySvc(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.app.show.mixture.v1.Mixture/RegionIndex" => {
#[allow(non_camel_case_types)]
struct RegionIndexSvc<T: Mixture>(pub Arc<T>);
impl<T: Mixture> tonic::server::UnaryService<super::RegionIndexReq>
for RegionIndexSvc<T> {
type Response = super::RegionIndexReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RegionIndexReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::region_index(&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 = RegionIndexSvc(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.app.show.mixture.v1.Mixture/RegionList" => {
#[allow(non_camel_case_types)]
struct RegionListSvc<T: Mixture>(pub Arc<T>);
impl<T: Mixture> tonic::server::UnaryService<super::RegionListReq>
for RegionListSvc<T> {
type Response = super::RegionListReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RegionListReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::region_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 = RegionListSvc(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.app.show.mixture.v1.Mixture/RegionShortcut" => {
#[allow(non_camel_case_types)]
struct RegionShortcutSvc<T: Mixture>(pub Arc<T>);
impl<
T: Mixture,
> tonic::server::UnaryService<super::RegionShortcutReq>
for RegionShortcutSvc<T> {
type Response = super::RegionShortcutReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RegionShortcutReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::region_shortcut(&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 = RegionShortcutSvc(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.app.show.mixture.v1.Mixture/Widget" => {
#[allow(non_camel_case_types)]
struct WidgetSvc<T: Mixture>(pub Arc<T>);
impl<T: Mixture> tonic::server::UnaryService<super::WidgetReq>
for WidgetSvc<T> {
type Response = super::WidgetReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::WidgetReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::widget(&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 = WidgetSvc(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.app.show.mixture.v1.Mixture/WidgetGuide" => {
#[allow(non_camel_case_types)]
struct WidgetGuideSvc<T: Mixture>(pub Arc<T>);
impl<T: Mixture> tonic::server::UnaryService<super::WidgetGuideReq>
for WidgetGuideSvc<T> {
type Response = super::WidgetGuideReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::WidgetGuideReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::widget_guide(&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 = WidgetGuideSvc(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.app.show.mixture.v1.Mixture/WidgetGuideUpdate" => {
#[allow(non_camel_case_types)]
struct WidgetGuideUpdateSvc<T: Mixture>(pub Arc<T>);
impl<
T: Mixture,
> tonic::server::UnaryService<super::WidgetGuideUpdateReq>
for WidgetGuideUpdateSvc<T> {
type Response = super::EmptyReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::WidgetGuideUpdateReq>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Mixture>::widget_guide_update(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = WidgetGuideUpdateSvc(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 MixtureServer<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.app.show.mixture.v1.Mixture";
impl<T> tonic::server::NamedService for MixtureServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}