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 NetQuality {
    ///
    #[prost(float, tag = "1")]
    pub success_rate: f32,
    ///
    #[prost(int32, tag = "2")]
    pub speed: i32,
    ///
    #[prost(int64, tag = "3")]
    pub speed_timestamp: i64,
    ///
    #[prost(int32, tag = "4")]
    pub net_type: i32,
}
impl ::prost::Name for NetQuality {
    const NAME: &'static str = "NetQuality";
    const PACKAGE: &'static str = "bilibili.metadata.network";
    fn full_name() -> ::prost::alloc::string::String {
        "bilibili.metadata.network.NetQuality".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/bilibili.metadata.network.NetQuality".into()
    }
}
///
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Network {
    ///
    #[prost(enumeration = "NetworkType", tag = "1")]
    pub r#type: i32,
    ///
    #[prost(enumeration = "TfType", tag = "2")]
    pub tf: i32,
    ///
    #[prost(string, tag = "3")]
    pub oid: ::prost::alloc::string::String,
    ///
    #[prost(enumeration = "CellularType", tag = "4")]
    pub cellular: i32,
    ///
    #[prost(message, optional, tag = "5")]
    pub quality: ::core::option::Option<NetQuality>,
}
impl ::prost::Name for Network {
    const NAME: &'static str = "Network";
    const PACKAGE: &'static str = "bilibili.metadata.network";
    fn full_name() -> ::prost::alloc::string::String {
        "bilibili.metadata.network.Network".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/bilibili.metadata.network.Network".into()
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CellularType {
    ///
    CNone = 0,
    ///
    C2g = 1,
    ///
    C3g = 2,
    ///
    C4g = 3,
    ///
    C5g = 4,
}
impl CellularType {
    /// 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::CNone => "C_NONE",
            Self::C2g => "C_2G",
            Self::C3g => "C_3G",
            Self::C4g => "C_4G",
            Self::C5g => "C_5G",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "C_NONE" => Some(Self::CNone),
            "C_2G" => Some(Self::C2g),
            "C_3G" => Some(Self::C3g),
            "C_4G" => Some(Self::C4g),
            "C_5G" => Some(Self::C5g),
            _ => None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NetworkType {
    ///
    NtUnknown = 0,
    ///
    Wifi = 1,
    ///
    Cellular = 2,
    ///
    Offline = 3,
    ///
    Othernet = 4,
    ///
    Ethernet = 5,
}
impl NetworkType {
    /// 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::NtUnknown => "NT_UNKNOWN",
            Self::Wifi => "WIFI",
            Self::Cellular => "CELLULAR",
            Self::Offline => "OFFLINE",
            Self::Othernet => "OTHERNET",
            Self::Ethernet => "ETHERNET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NT_UNKNOWN" => Some(Self::NtUnknown),
            "WIFI" => Some(Self::Wifi),
            "CELLULAR" => Some(Self::Cellular),
            "OFFLINE" => Some(Self::Offline),
            "OTHERNET" => Some(Self::Othernet),
            "ETHERNET" => Some(Self::Ethernet),
            _ => None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TfType {
    ///
    TfUnknown = 0,
    ///
    UCard = 1,
    ///
    UPkg = 2,
    ///
    CCard = 3,
    ///
    CPkg = 4,
    ///
    TCard = 5,
    ///
    TPkg = 6,
}
impl TfType {
    /// 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::TfUnknown => "TF_UNKNOWN",
            Self::UCard => "U_CARD",
            Self::UPkg => "U_PKG",
            Self::CCard => "C_CARD",
            Self::CPkg => "C_PKG",
            Self::TCard => "T_CARD",
            Self::TPkg => "T_PKG",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TF_UNKNOWN" => Some(Self::TfUnknown),
            "U_CARD" => Some(Self::UCard),
            "U_PKG" => Some(Self::UPkg),
            "C_CARD" => Some(Self::CCard),
            "C_PKG" => Some(Self::CPkg),
            "T_CARD" => Some(Self::TCard),
            "T_PKG" => Some(Self::TPkg),
            _ => None,
        }
    }
}