use super::NnsGovernanceReportContext;
use serde::{Deserialize as SerdeDeserialize, Serialize};
#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
pub struct NnsGovernanceMetricBucket<Value> {
pub key: u64,
pub value: Value,
}
#[derive(Clone, Debug, PartialEq, SerdeDeserialize, Serialize)]
pub struct NnsGovernanceMetricsReport {
#[serde(flatten)]
pub context: NnsGovernanceReportContext,
pub metrics: NnsGovernanceMetrics,
}
#[derive(Clone, Debug, PartialEq, SerdeDeserialize, Serialize)]
pub struct NnsGovernanceMetrics {
pub total_maturity_e8s_equivalent: u64,
pub not_dissolving_neurons_e8s_buckets: Vec<NnsGovernanceMetricBucket<f64>>,
pub dissolving_neurons_staked_maturity_e8s_equivalent_sum: u64,
pub garbage_collectable_neurons_count: u64,
pub dissolving_neurons_staked_maturity_e8s_equivalent_buckets:
Vec<NnsGovernanceMetricBucket<f64>>,
pub neurons_with_invalid_stake_count: u64,
pub not_dissolving_neurons_count_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub ect_neuron_count: u64,
pub total_supply_icp: u64,
pub neurons_with_less_than_6_months_dissolve_delay_count: u64,
pub dissolved_neurons_count: u64,
pub community_fund_total_maturity_e8s_equivalent: u64,
pub total_staked_e8s_seed: u64,
pub total_staked_maturity_e8s_equivalent_ect: u64,
pub total_staked_e8s: u64,
pub not_dissolving_neurons_count: u64,
pub total_locked_e8s: u64,
pub neurons_fund_total_active_neurons: u64,
pub total_voting_power_non_self_authenticating_controller: Option<u64>,
pub total_staked_maturity_e8s_equivalent: u64,
pub not_dissolving_neurons_e8s_buckets_ect: Vec<NnsGovernanceMetricBucket<f64>>,
pub total_staked_e8s_ect: u64,
pub not_dissolving_neurons_staked_maturity_e8s_equivalent_sum: u64,
pub dissolved_neurons_e8s: u64,
pub total_staked_e8s_non_self_authenticating_controller: Option<u64>,
pub dissolving_neurons_e8s_buckets_seed: Vec<NnsGovernanceMetricBucket<f64>>,
pub neurons_with_less_than_6_months_dissolve_delay_e8s: u64,
pub not_dissolving_neurons_staked_maturity_e8s_equivalent_buckets:
Vec<NnsGovernanceMetricBucket<f64>>,
pub dissolving_neurons_count_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub dissolving_neurons_e8s_buckets_ect: Vec<NnsGovernanceMetricBucket<f64>>,
pub dissolving_neurons_count: u64,
pub dissolving_neurons_e8s_buckets: Vec<NnsGovernanceMetricBucket<f64>>,
pub total_staked_maturity_e8s_equivalent_seed: u64,
pub community_fund_total_staked_e8s: u64,
pub not_dissolving_neurons_e8s_buckets_seed: Vec<NnsGovernanceMetricBucket<f64>>,
pub timestamp_seconds: u64,
pub seed_neuron_count: u64,
pub spawning_neurons_count: u64,
pub total_maturity_disbursements_in_progress_e8s_equivalent: u64,
pub non_self_authenticating_controller_neuron_subset_metrics:
Option<NnsGovernanceNeuronSubsetMetrics>,
pub public_neuron_subset_metrics: Option<NnsGovernanceNeuronSubsetMetrics>,
pub declining_voting_power_neuron_subset_metrics: Option<NnsGovernanceNeuronSubsetMetrics>,
pub fully_lost_voting_power_neuron_subset_metrics: Option<NnsGovernanceNeuronSubsetMetrics>,
}
#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
pub struct NnsGovernanceNeuronSubsetMetrics {
pub count: Option<u64>,
pub total_staked_e8s: Option<u64>,
pub total_maturity_e8s_equivalent: Option<u64>,
pub total_staked_maturity_e8s_equivalent: Option<u64>,
pub total_voting_power: Option<u64>,
pub total_deciding_voting_power: Option<u64>,
pub total_potential_voting_power: Option<u64>,
pub count_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub staked_e8s_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub maturity_e8s_equivalent_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub staked_maturity_e8s_equivalent_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub voting_power_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub deciding_voting_power_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
pub potential_voting_power_buckets: Vec<NnsGovernanceMetricBucket<u64>>,
}