mikufans-proto 8.52.0+build.19546312

gRPC APIs for Mikufans
Documentation
// This file is @generated by prost-build.
///
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ItemWhRatio {
    ///
    #[prost(enumeration = "WhRatio", tag = "1")]
    pub ratio: i32,
    ///
    #[prost(int32, tag = "2")]
    pub width: i32,
    ///
    #[prost(int32, tag = "3")]
    pub height: i32,
}
impl ::prost::Name for ItemWhRatio {
    const NAME: &'static str = "ItemWHRatio";
    const PACKAGE: &'static str = "bilibili.app.dynamic.common";
    fn full_name() -> ::prost::alloc::string::String {
        "bilibili.app.dynamic.common.ItemWHRatio".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/bilibili.app.dynamic.common.ItemWHRatio".into()
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TranslateState {
    ///
    StateOriginal = 0,
    ///
    StateTranslated = 1,
}
impl TranslateState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::StateOriginal => "STATE_ORIGINAL",
            Self::StateTranslated => "STATE_TRANSLATED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STATE_ORIGINAL" => Some(Self::StateOriginal),
            "STATE_TRANSLATED" => Some(Self::StateTranslated),
            _ => None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TranslateSwitch {
    ///
    TransUnknown = 0,
    ///
    TransSeeOriginal = 1,
    ///
    TransTranslate = 2,
}
impl TranslateSwitch {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::TransUnknown => "TRANS_UNKNOWN",
            Self::TransSeeOriginal => "TRANS_SEE_ORIGINAL",
            Self::TransTranslate => "TRANS_TRANSLATE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRANS_UNKNOWN" => Some(Self::TransUnknown),
            "TRANS_SEE_ORIGINAL" => Some(Self::TransSeeOriginal),
            "TRANS_TRANSLATE" => Some(Self::TransTranslate),
            _ => None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TribeeRefresh {
    ///
    RefreshNew = 0,
    ///
    RefreshHistory = 1,
}
impl TribeeRefresh {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::RefreshNew => "REFRESH_NEW",
            Self::RefreshHistory => "REFRESH_HISTORY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "REFRESH_NEW" => Some(Self::RefreshNew),
            "REFRESH_HISTORY" => Some(Self::RefreshHistory),
            _ => None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WhRatio {
    ///
    WHRatio11 = 0,
    ///
    WHRatio169 = 1,
    ///
    WHRatio34 = 2,
    ///
    WHRatioCustom = 3,
}
impl WhRatio {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::WHRatio11 => "W_H_RATIO_1_1",
            Self::WHRatio169 => "W_H_RATIO_16_9",
            Self::WHRatio34 => "W_H_RATIO_3_4",
            Self::WHRatioCustom => "W_H_RATIO_CUSTOM",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "W_H_RATIO_1_1" => Some(Self::WHRatio11),
            "W_H_RATIO_16_9" => Some(Self::WHRatio169),
            "W_H_RATIO_3_4" => Some(Self::WHRatio34),
            "W_H_RATIO_CUSTOM" => Some(Self::WHRatioCustom),
            _ => None,
        }
    }
}