#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpRequest {
#[prost(string, tag = "1")]
pub request_method: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub request_url: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub request_size: i64,
#[prost(int32, tag = "4")]
pub status: i32,
#[prost(int64, tag = "5")]
pub response_size: i64,
#[prost(string, tag = "6")]
pub user_agent: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub remote_ip: ::prost::alloc::string::String,
#[prost(string, tag = "13")]
pub server_ip: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub referer: ::prost::alloc::string::String,
#[prost(message, optional, tag = "14")]
pub latency: ::core::option::Option<::prost_types::Duration>,
#[prost(bool, tag = "11")]
pub cache_lookup: bool,
#[prost(bool, tag = "9")]
pub cache_hit: bool,
#[prost(bool, tag = "10")]
pub cache_validated_with_origin_server: bool,
#[prost(int64, tag = "12")]
pub cache_fill_bytes: i64,
#[prost(string, tag = "15")]
pub protocol: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogSeverity {
Default = 0,
Debug = 100,
Info = 200,
Notice = 300,
Warning = 400,
Error = 500,
Critical = 600,
Alert = 700,
Emergency = 800,
}
impl LogSeverity {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "DEFAULT",
Self::Debug => "DEBUG",
Self::Info => "INFO",
Self::Notice => "NOTICE",
Self::Warning => "WARNING",
Self::Error => "ERROR",
Self::Critical => "CRITICAL",
Self::Alert => "ALERT",
Self::Emergency => "EMERGENCY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT" => Some(Self::Default),
"DEBUG" => Some(Self::Debug),
"INFO" => Some(Self::Info),
"NOTICE" => Some(Self::Notice),
"WARNING" => Some(Self::Warning),
"ERROR" => Some(Self::Error),
"CRITICAL" => Some(Self::Critical),
"ALERT" => Some(Self::Alert),
"EMERGENCY" => Some(Self::Emergency),
_ => None,
}
}
}