#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProducerInfo {
#[prost(string, tag = "1")]
pub library: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashSpec {
#[prost(enumeration = "HashAlgorithm", tag = "1")]
pub algorithm: i32,
#[prost(uint32, tag = "2")]
pub canonical_seed_index: u32,
#[prost(uint64, repeated, tag = "3")]
pub seed_list: ::prost::alloc::vec::Vec<u64>,
#[prost(enumeration = "SeedDerivation", tag = "4")]
pub seed_derivation: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HashAlgorithm {
Unspecified = 0,
Xxh364 = 1,
Xxh3128 = 2,
Xxhash64 = 3,
}
impl HashAlgorithm {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HASH_ALGORITHM_UNSPECIFIED",
Self::Xxh364 => "HASH_ALGORITHM_XXH3_64",
Self::Xxh3128 => "HASH_ALGORITHM_XXH3_128",
Self::Xxhash64 => "HASH_ALGORITHM_XXHASH64",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HASH_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
"HASH_ALGORITHM_XXH3_64" => Some(Self::Xxh364),
"HASH_ALGORITHM_XXH3_128" => Some(Self::Xxh3128),
"HASH_ALGORITHM_XXHASH64" => Some(Self::Xxhash64),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SeedDerivation {
Unspecified = 0,
AdditiveOffset = 1,
Packed = 2,
}
impl SeedDerivation {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SEED_DERIVATION_UNSPECIFIED",
Self::AdditiveOffset => "SEED_DERIVATION_ADDITIVE_OFFSET",
Self::Packed => "SEED_DERIVATION_PACKED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SEED_DERIVATION_UNSPECIFIED" => Some(Self::Unspecified),
"SEED_DERIVATION_ADDITIVE_OFFSET" => Some(Self::AdditiveOffset),
"SEED_DERIVATION_PACKED" => Some(Self::Packed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CounterType {
Unspecified = 0,
Int32 = 1,
Int64 = 2,
Int128 = 3,
Float64 = 4,
}
impl CounterType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "COUNTER_TYPE_UNSPECIFIED",
Self::Int32 => "COUNTER_TYPE_INT32",
Self::Int64 => "COUNTER_TYPE_INT64",
Self::Int128 => "COUNTER_TYPE_INT128",
Self::Float64 => "COUNTER_TYPE_FLOAT64",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COUNTER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"COUNTER_TYPE_INT32" => Some(Self::Int32),
"COUNTER_TYPE_INT64" => Some(Self::Int64),
"COUNTER_TYPE_INT128" => Some(Self::Int128),
"COUNTER_TYPE_FLOAT64" => Some(Self::Float64),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountMinState {
#[prost(uint32, tag = "1")]
pub rows: u32,
#[prost(uint32, tag = "2")]
pub cols: u32,
#[prost(enumeration = "CounterType", tag = "3")]
pub counter_type: i32,
#[prost(sint64, repeated, tag = "4")]
pub counts_int: ::prost::alloc::vec::Vec<i64>,
#[prost(double, repeated, tag = "5")]
pub counts_float: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "6")]
pub sum_counts: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "7")]
pub sum2_counts: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "8")]
pub l1: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "9")]
pub l2: ::prost::alloc::vec::Vec<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountSketchState {
#[prost(uint32, tag = "1")]
pub rows: u32,
#[prost(uint32, tag = "2")]
pub cols: u32,
#[prost(enumeration = "CounterType", tag = "3")]
pub counter_type: i32,
#[prost(sint64, repeated, tag = "4")]
pub counts_int: ::prost::alloc::vec::Vec<i64>,
#[prost(double, repeated, tag = "5")]
pub counts_float: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "6")]
pub l2: ::prost::alloc::vec::Vec<f64>,
#[prost(message, optional, tag = "7")]
pub topk: ::core::option::Option<TopKState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TopKState {
#[prost(uint32, tag = "1")]
pub k: u32,
#[prost(message, repeated, tag = "2")]
pub entries: ::prost::alloc::vec::Vec<HeapEntry>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeapEntry {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub count: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HyperLogLogState {
#[prost(enumeration = "HllVariant", tag = "1")]
pub variant: i32,
#[prost(uint32, tag = "2")]
pub precision: u32,
#[prost(bytes = "vec", tag = "3")]
pub registers: ::prost::alloc::vec::Vec<u8>,
#[prost(double, tag = "4")]
pub hip_kxq0: f64,
#[prost(double, tag = "5")]
pub hip_kxq1: f64,
#[prost(double, tag = "6")]
pub hip_est: f64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HllVariant {
Unspecified = 0,
Regular = 1,
ErtlMle = 2,
Hip = 3,
}
impl HllVariant {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HLL_VARIANT_UNSPECIFIED",
Self::Regular => "HLL_VARIANT_REGULAR",
Self::ErtlMle => "HLL_VARIANT_ERTL_MLE",
Self::Hip => "HLL_VARIANT_HIP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HLL_VARIANT_UNSPECIFIED" => Some(Self::Unspecified),
"HLL_VARIANT_REGULAR" => Some(Self::Regular),
"HLL_VARIANT_ERTL_MLE" => Some(Self::ErtlMle),
"HLL_VARIANT_HIP" => Some(Self::Hip),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KllState {
#[prost(uint32, tag = "1")]
pub k: u32,
#[prost(uint32, tag = "2")]
pub m: u32,
#[prost(uint32, tag = "3")]
pub num_levels: u32,
#[prost(uint32, repeated, tag = "4")]
pub levels: ::prost::alloc::vec::Vec<u32>,
#[prost(double, repeated, tag = "5")]
pub items: ::prost::alloc::vec::Vec<f64>,
#[prost(message, optional, tag = "6")]
pub coin: ::core::option::Option<CoinState>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CoinState {
#[prost(uint64, tag = "1")]
pub state: u64,
#[prost(uint64, tag = "2")]
pub bit_cache: u64,
#[prost(uint32, tag = "3")]
pub remaining_bits: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DdSketchState {
#[prost(double, tag = "1")]
pub alpha: f64,
#[prost(uint64, repeated, tag = "2")]
pub store_counts: ::prost::alloc::vec::Vec<u64>,
#[prost(sint32, tag = "3")]
pub store_offset: i32,
#[prost(uint64, tag = "4")]
pub count: u64,
#[prost(double, tag = "5")]
pub sum: f64,
#[prost(double, tag = "6")]
pub min: f64,
#[prost(double, tag = "7")]
pub max: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnivMonState {
#[prost(uint32, tag = "1")]
pub layer_size: u32,
#[prost(uint32, tag = "2")]
pub sketch_rows: u32,
#[prost(uint32, tag = "3")]
pub sketch_cols: u32,
#[prost(uint32, tag = "4")]
pub heap_size: u32,
#[prost(uint64, tag = "5")]
pub bucket_size: u64,
#[prost(message, repeated, tag = "6")]
pub layers: ::prost::alloc::vec::Vec<UnivMonLayer>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnivMonLayer {
#[prost(message, optional, tag = "1")]
pub sketch: ::core::option::Option<CountSketchState>,
#[prost(message, optional, tag = "2")]
pub heap: ::core::option::Option<TopKState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HydraState {
#[prost(uint32, tag = "1")]
pub row_num: u32,
#[prost(uint32, tag = "2")]
pub col_num: u32,
#[prost(enumeration = "HydraCounterType", tag = "3")]
pub counter_type: i32,
#[prost(message, repeated, tag = "4")]
pub cells: ::prost::alloc::vec::Vec<HydraCell>,
#[prost(message, optional, tag = "5")]
pub big_counter: ::core::option::Option<HydraCell>,
#[prost(uint32, tag = "6")]
pub seed_index: u32,
#[prost(bool, tag = "7")]
pub enable_topk: bool,
#[prost(bool, tag = "8")]
pub fanout_subkeys: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HydraCell {
#[prost(oneof = "hydra_cell::Sketch", tags = "1, 2, 3, 4, 5")]
pub sketch: ::core::option::Option<hydra_cell::Sketch>,
}
pub mod hydra_cell {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Sketch {
#[prost(message, tag = "1")]
CountMin(super::CountMinState),
#[prost(message, tag = "2")]
CountSketch(super::CountSketchState),
#[prost(message, tag = "3")]
Hll(super::HyperLogLogState),
#[prost(message, tag = "4")]
Kll(super::KllState),
#[prost(message, tag = "5")]
Univmon(super::UnivMonState),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HydraCounterType {
Unspecified = 0,
CountMin = 1,
CountSketch = 2,
Hll = 3,
Kll = 4,
Univmon = 5,
}
impl HydraCounterType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "HYDRA_COUNTER_TYPE_UNSPECIFIED",
Self::CountMin => "HYDRA_COUNTER_TYPE_COUNT_MIN",
Self::CountSketch => "HYDRA_COUNTER_TYPE_COUNT_SKETCH",
Self::Hll => "HYDRA_COUNTER_TYPE_HLL",
Self::Kll => "HYDRA_COUNTER_TYPE_KLL",
Self::Univmon => "HYDRA_COUNTER_TYPE_UNIVMON",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HYDRA_COUNTER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"HYDRA_COUNTER_TYPE_COUNT_MIN" => Some(Self::CountMin),
"HYDRA_COUNTER_TYPE_COUNT_SKETCH" => Some(Self::CountSketch),
"HYDRA_COUNTER_TYPE_HLL" => Some(Self::Hll),
"HYDRA_COUNTER_TYPE_KLL" => Some(Self::Kll),
"HYDRA_COUNTER_TYPE_UNIVMON" => Some(Self::Univmon),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CocoSketchState {
#[prost(uint32, tag = "1")]
pub d: u32,
#[prost(uint32, tag = "2")]
pub width: u32,
#[prost(uint64, repeated, tag = "3")]
pub hashes: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "4")]
pub vals: ::prost::alloc::vec::Vec<u64>,
#[prost(bool, repeated, tag = "5")]
pub has_keys: ::prost::alloc::vec::Vec<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ElasticState {
#[prost(uint32, tag = "1")]
pub bucket_count: u32,
#[prost(string, repeated, tag = "2")]
pub flow_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(sint32, repeated, tag = "3")]
pub vote_pos: ::prost::alloc::vec::Vec<i32>,
#[prost(sint32, repeated, tag = "4")]
pub vote_neg: ::prost::alloc::vec::Vec<i32>,
#[prost(bool, repeated, tag = "5")]
pub evictions: ::prost::alloc::vec::Vec<bool>,
#[prost(message, optional, tag = "6")]
pub light: ::core::option::Option<CountMinState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SketchEnvelope {
#[prost(uint32, tag = "1")]
pub format_version: u32,
#[prost(message, optional, tag = "2")]
pub producer: ::core::option::Option<ProducerInfo>,
#[prost(message, optional, tag = "3")]
pub hash_spec: ::core::option::Option<HashSpec>,
#[prost(
oneof = "sketch_envelope::SketchState",
tags = "10, 11, 12, 13, 14, 15, 16, 17, 18"
)]
pub sketch_state: ::core::option::Option<sketch_envelope::SketchState>,
}
pub mod sketch_envelope {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SketchState {
#[prost(message, tag = "10")]
CountMin(super::CountMinState),
#[prost(message, tag = "11")]
CountSketch(super::CountSketchState),
#[prost(message, tag = "12")]
Hll(super::HyperLogLogState),
#[prost(message, tag = "13")]
Kll(super::KllState),
#[prost(message, tag = "14")]
Ddsketch(super::DdSketchState),
#[prost(message, tag = "15")]
Univmon(super::UnivMonState),
#[prost(message, tag = "16")]
Hydra(super::HydraState),
#[prost(message, tag = "17")]
Coco(super::CocoSketchState),
#[prost(message, tag = "18")]
Elastic(super::ElasticState),
}
}