#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Restriction {
#[prost(bool, tag = "1")]
pub teenagers_mode: bool,
#[prost(bool, tag = "2")]
pub lessons_mode: bool,
#[prost(enumeration = "ModeType", tag = "3")]
pub mode: i32,
#[prost(bool, tag = "4")]
pub review: bool,
#[prost(bool, tag = "5")]
pub disable_rcmd: bool,
#[prost(bool, tag = "6")]
pub basic_mode: bool,
#[prost(int32, tag = "7")]
pub teenagers_age: i32,
}
impl ::prost::Name for Restriction {
const NAME: &'static str = "Restriction";
const PACKAGE: &'static str = "bilibili.metadata.restriction";
fn full_name() -> ::prost::alloc::string::String {
"bilibili.metadata.restriction.Restriction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/bilibili.metadata.restriction.Restriction".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ModeType {
Normal = 0,
Teenagers = 1,
Lessons = 2,
Basic = 3,
}
impl ModeType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Normal => "NORMAL",
Self::Teenagers => "TEENAGERS",
Self::Lessons => "LESSONS",
Self::Basic => "BASIC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NORMAL" => Some(Self::Normal),
"TEENAGERS" => Some(Self::Teenagers),
"LESSONS" => Some(Self::Lessons),
"BASIC" => Some(Self::Basic),
_ => None,
}
}
}