lethean 1.2.2

Lethean VPN Marketplace API
Documentation
/*
 * Lethean VPN
 *
 * Distributed Virtual Private Marketplace
 *
 * The version of the OpenAPI document: 1.2.1
 * Contact: contact@lethean.io
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct NetworkStatsEntity {
    #[serde(rename = "alt_blocks_count")]
    pub alt_blocks_count: f32,
    #[serde(rename = "block_size_limit")]
    pub block_size_limit: f32,
    #[serde(rename = "cumulative_difficulty")]
    pub cumulative_difficulty: f32,
    #[serde(rename = "current")]
    pub current: bool,
    #[serde(rename = "difficulty")]
    pub difficulty: f32,
    #[serde(rename = "fee_per_kb")]
    pub fee_per_kb: f32,
    #[serde(rename = "grey_peerlist_size")]
    pub grey_peerlist_size: f32,
    #[serde(rename = "hash_rate")]
    pub hash_rate: f32,
    #[serde(rename = "height")]
    pub height: f32,
    #[serde(rename = "incoming_connections_count")]
    pub incoming_connections_count: f32,
    #[serde(rename = "outgoing_connections_count")]
    pub outgoing_connections_count: f32,
    #[serde(rename = "start_time")]
    pub start_time: f32,
    #[serde(rename = "status")]
    pub status: bool,
    #[serde(rename = "target")]
    pub target: f32,
    #[serde(rename = "target_height")]
    pub target_height: f32,
    #[serde(rename = "testnet")]
    pub testnet: bool,
    #[serde(rename = "top_block_hash")]
    pub top_block_hash: String,
    #[serde(rename = "tx_count")]
    pub tx_count: f32,
    #[serde(rename = "tx_pool_size")]
    pub tx_pool_size: f32,
    #[serde(rename = "tx_pool_size_kbytes")]
    pub tx_pool_size_kbytes: f32,
    #[serde(rename = "white_peerlist_size")]
    pub white_peerlist_size: f32,
}

impl NetworkStatsEntity {
    pub fn new(alt_blocks_count: f32, block_size_limit: f32, cumulative_difficulty: f32, current: bool, difficulty: f32, fee_per_kb: f32, grey_peerlist_size: f32, hash_rate: f32, height: f32, incoming_connections_count: f32, outgoing_connections_count: f32, start_time: f32, status: bool, target: f32, target_height: f32, testnet: bool, top_block_hash: String, tx_count: f32, tx_pool_size: f32, tx_pool_size_kbytes: f32, white_peerlist_size: f32) -> NetworkStatsEntity {
        NetworkStatsEntity {
            alt_blocks_count,
            block_size_limit,
            cumulative_difficulty,
            current,
            difficulty,
            fee_per_kb,
            grey_peerlist_size,
            hash_rate,
            height,
            incoming_connections_count,
            outgoing_connections_count,
            start_time,
            status,
            target,
            target_height,
            testnet,
            top_block_hash,
            tx_count,
            tx_pool_size,
            tx_pool_size_kbytes,
            white_peerlist_size,
        }
    }
}