#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DdSketch {
#[prost(message, optional, tag = "1")]
pub mapping: ::core::option::Option<IndexMapping>,
#[prost(message, optional, tag = "2")]
pub positive_values: ::core::option::Option<Store>,
#[prost(message, optional, tag = "3")]
pub negative_values: ::core::option::Option<Store>,
#[prost(double, tag = "4")]
pub zero_count: f64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IndexMapping {
#[prost(double, tag = "1")]
pub gamma: f64,
#[prost(double, tag = "2")]
pub index_offset: f64,
#[prost(enumeration = "index_mapping::Interpolation", tag = "3")]
pub interpolation: i32,
}
pub mod index_mapping {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Interpolation {
None = 0,
Linear = 1,
Quadratic = 2,
Cubic = 3,
}
impl Interpolation {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::None => "NONE",
Self::Linear => "LINEAR",
Self::Quadratic => "QUADRATIC",
Self::Cubic => "CUBIC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NONE" => Some(Self::None),
"LINEAR" => Some(Self::Linear),
"QUADRATIC" => Some(Self::Quadratic),
"CUBIC" => Some(Self::Cubic),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Store {
#[prost(map = "sint32, double", tag = "1")]
pub bin_counts: ::std::collections::HashMap<i32, f64>,
#[prost(double, repeated, tag = "2")]
pub contiguous_bin_counts: ::prost::alloc::vec::Vec<f64>,
#[prost(sint32, tag = "3")]
pub contiguous_bin_index_offset: i32,
}