#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Peer {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub range: ::core::option::Option<Range>,
#[prost(enumeration = "Priority", tag = "3")]
pub priority: i32,
#[prost(message, repeated, tag = "4")]
pub pieces: ::prost::alloc::vec::Vec<Piece>,
#[prost(message, optional, tag = "5")]
pub cost: ::core::option::Option<::prost_wkt_types::Duration>,
#[prost(string, tag = "6")]
pub state: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub task: ::core::option::Option<Task>,
#[prost(message, optional, tag = "8")]
pub host: ::core::option::Option<Host>,
#[prost(bool, tag = "9")]
pub need_back_to_source: bool,
#[prost(message, optional, tag = "10")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "11")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CachePeer {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub persistent: bool,
#[prost(message, optional, tag = "3")]
pub cost: ::core::option::Option<::prost_wkt_types::Duration>,
#[prost(string, tag = "4")]
pub state: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub task: ::core::option::Option<CacheTask>,
#[prost(message, optional, tag = "6")]
pub host: ::core::option::Option<Host>,
#[prost(message, optional, tag = "7")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Task {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "TaskType", tag = "2")]
pub r#type: i32,
#[prost(string, tag = "3")]
pub url: ::prost::alloc::string::String,
#[prost(string, optional, tag = "4")]
pub digest: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub tag: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub application: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "7")]
pub filtered_query_params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "8")]
pub request_header: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(uint64, tag = "9")]
pub piece_length: u64,
#[prost(uint64, tag = "10")]
pub content_length: u64,
#[prost(uint32, tag = "11")]
pub piece_count: u32,
#[prost(enumeration = "SizeScope", tag = "12")]
pub size_scope: i32,
#[prost(message, repeated, tag = "13")]
pub pieces: ::prost::alloc::vec::Vec<Piece>,
#[prost(string, tag = "14")]
pub state: ::prost::alloc::string::String,
#[prost(uint32, tag = "15")]
pub peer_count: u32,
#[prost(bool, tag = "16")]
pub has_available_peer: bool,
#[prost(message, optional, tag = "17")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "18")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheTask {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub persistent_replica_count: u64,
#[prost(uint64, tag = "3")]
pub replica_count: u64,
#[prost(string, tag = "4")]
pub digest: ::prost::alloc::string::String,
#[prost(string, optional, tag = "5")]
pub tag: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub application: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, tag = "7")]
pub piece_length: u64,
#[prost(uint64, tag = "8")]
pub content_length: u64,
#[prost(uint32, tag = "9")]
pub piece_count: u32,
#[prost(string, tag = "10")]
pub state: ::prost::alloc::string::String,
#[prost(message, optional, tag = "11")]
pub ttl: ::core::option::Option<::prost_wkt_types::Duration>,
#[prost(message, optional, tag = "12")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "13")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Host {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub r#type: u32,
#[prost(string, tag = "3")]
pub hostname: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub ip: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub port: i32,
#[prost(int32, tag = "6")]
pub download_port: i32,
#[prost(string, tag = "7")]
pub os: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub platform: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub platform_family: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub platform_version: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub kernel_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "12")]
pub cpu: ::core::option::Option<Cpu>,
#[prost(message, optional, tag = "13")]
pub memory: ::core::option::Option<Memory>,
#[prost(message, optional, tag = "14")]
pub network: ::core::option::Option<Network>,
#[prost(message, optional, tag = "15")]
pub disk: ::core::option::Option<Disk>,
#[prost(message, optional, tag = "16")]
pub build: ::core::option::Option<Build>,
#[prost(uint64, tag = "17")]
pub scheduler_cluster_id: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cpu {
#[prost(uint32, tag = "1")]
pub logical_count: u32,
#[prost(uint32, tag = "2")]
pub physical_count: u32,
#[prost(double, tag = "3")]
pub percent: f64,
#[prost(double, tag = "4")]
pub process_percent: f64,
#[prost(message, optional, tag = "5")]
pub times: ::core::option::Option<CpuTimes>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CpuTimes {
#[prost(double, tag = "1")]
pub user: f64,
#[prost(double, tag = "2")]
pub system: f64,
#[prost(double, tag = "3")]
pub idle: f64,
#[prost(double, tag = "4")]
pub nice: f64,
#[prost(double, tag = "5")]
pub iowait: f64,
#[prost(double, tag = "6")]
pub irq: f64,
#[prost(double, tag = "7")]
pub softirq: f64,
#[prost(double, tag = "8")]
pub steal: f64,
#[prost(double, tag = "9")]
pub guest: f64,
#[prost(double, tag = "10")]
pub guest_nice: f64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Memory {
#[prost(uint64, tag = "1")]
pub total: u64,
#[prost(uint64, tag = "2")]
pub available: u64,
#[prost(uint64, tag = "3")]
pub used: u64,
#[prost(double, tag = "4")]
pub used_percent: f64,
#[prost(double, tag = "5")]
pub process_used_percent: f64,
#[prost(uint64, tag = "6")]
pub free: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Network {
#[prost(uint32, tag = "1")]
pub tcp_connection_count: u32,
#[prost(uint32, tag = "2")]
pub upload_tcp_connection_count: u32,
#[prost(string, optional, tag = "3")]
pub location: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub idc: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Disk {
#[prost(uint64, tag = "1")]
pub total: u64,
#[prost(uint64, tag = "2")]
pub free: u64,
#[prost(uint64, tag = "3")]
pub used: u64,
#[prost(double, tag = "4")]
pub used_percent: f64,
#[prost(uint64, tag = "5")]
pub inodes_total: u64,
#[prost(uint64, tag = "6")]
pub inodes_used: u64,
#[prost(uint64, tag = "7")]
pub inodes_free: u64,
#[prost(double, tag = "8")]
pub inodes_used_percent: f64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Build {
#[prost(string, tag = "1")]
pub git_version: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub git_commit: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub go_version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub rust_version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub platform: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Download {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub digest: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub range: ::core::option::Option<Range>,
#[prost(enumeration = "TaskType", tag = "4")]
pub r#type: i32,
#[prost(string, optional, tag = "5")]
pub tag: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub application: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "Priority", tag = "7")]
pub priority: i32,
#[prost(string, repeated, tag = "8")]
pub filtered_query_params: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "9")]
pub request_header: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(uint64, tag = "10")]
pub piece_length: u64,
#[prost(string, optional, tag = "11")]
pub output_path: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "12")]
pub timeout: ::core::option::Option<::prost_wkt_types::Duration>,
#[prost(bool, tag = "13")]
pub disable_back_to_source: bool,
#[prost(bool, tag = "14")]
pub need_back_to_source: bool,
#[prost(bytes = "vec", repeated, tag = "15")]
pub certificate_chain: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, tag = "16")]
pub prefetch: bool,
#[prost(message, optional, tag = "17")]
pub object_storage: ::core::option::Option<ObjectStorage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStorage {
#[prost(string, tag = "1")]
pub access_key_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub access_key_secret: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub session_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Range {
#[prost(uint64, tag = "1")]
pub start: u64,
#[prost(uint64, tag = "2")]
pub length: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Piece {
#[prost(uint32, tag = "1")]
pub number: u32,
#[prost(string, optional, tag = "2")]
pub parent_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, tag = "3")]
pub offset: u64,
#[prost(uint64, tag = "4")]
pub length: u64,
#[prost(string, tag = "5")]
pub digest: ::prost::alloc::string::String,
#[prost(bytes = "vec", optional, tag = "6")]
pub content: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(enumeration = "TrafficType", optional, tag = "7")]
pub traffic_type: ::core::option::Option<i32>,
#[prost(message, optional, tag = "8")]
pub cost: ::core::option::Option<::prost_wkt_types::Duration>,
#[prost(message, optional, tag = "9")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SizeScope {
Normal = 0,
Small = 1,
Tiny = 2,
Empty = 3,
}
impl SizeScope {
pub fn as_str_name(&self) -> &'static str {
match self {
SizeScope::Normal => "NORMAL",
SizeScope::Small => "SMALL",
SizeScope::Tiny => "TINY",
SizeScope::Empty => "EMPTY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NORMAL" => Some(Self::Normal),
"SMALL" => Some(Self::Small),
"TINY" => Some(Self::Tiny),
"EMPTY" => Some(Self::Empty),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TaskType {
Dfdaemon = 0,
Dfcache = 1,
Dfstore = 2,
}
impl TaskType {
pub fn as_str_name(&self) -> &'static str {
match self {
TaskType::Dfdaemon => "DFDAEMON",
TaskType::Dfcache => "DFCACHE",
TaskType::Dfstore => "DFSTORE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DFDAEMON" => Some(Self::Dfdaemon),
"DFCACHE" => Some(Self::Dfcache),
"DFSTORE" => Some(Self::Dfstore),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TrafficType {
BackToSource = 0,
RemotePeer = 1,
LocalPeer = 2,
}
impl TrafficType {
pub fn as_str_name(&self) -> &'static str {
match self {
TrafficType::BackToSource => "BACK_TO_SOURCE",
TrafficType::RemotePeer => "REMOTE_PEER",
TrafficType::LocalPeer => "LOCAL_PEER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BACK_TO_SOURCE" => Some(Self::BackToSource),
"REMOTE_PEER" => Some(Self::RemotePeer),
"LOCAL_PEER" => Some(Self::LocalPeer),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Priority {
Level0 = 0,
Level1 = 1,
Level2 = 2,
Level3 = 3,
Level4 = 4,
Level5 = 5,
Level6 = 6,
}
impl Priority {
pub fn as_str_name(&self) -> &'static str {
match self {
Priority::Level0 => "LEVEL0",
Priority::Level1 => "LEVEL1",
Priority::Level2 => "LEVEL2",
Priority::Level3 => "LEVEL3",
Priority::Level4 => "LEVEL4",
Priority::Level5 => "LEVEL5",
Priority::Level6 => "LEVEL6",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LEVEL0" => Some(Self::Level0),
"LEVEL1" => Some(Self::Level1),
"LEVEL2" => Some(Self::Level2),
"LEVEL3" => Some(Self::Level3),
"LEVEL4" => Some(Self::Level4),
"LEVEL5" => Some(Self::Level5),
"LEVEL6" => Some(Self::Level6),
_ => None,
}
}
}