39 lines
1.0 KiB
Rust
39 lines
1.0 KiB
Rust
/*
|
|
* rfs
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 0.2.0
|
|
*
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
use crate::models;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// BlockDownloadsResponse : Response for block downloads endpoint
|
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct BlockDownloadsResponse {
|
|
/// Block hash
|
|
#[serde(rename = "block_hash")]
|
|
pub block_hash: String,
|
|
/// Size of the block in bytes
|
|
#[serde(rename = "block_size")]
|
|
pub block_size: i64,
|
|
/// Number of times the block has been downloaded
|
|
#[serde(rename = "downloads_count")]
|
|
pub downloads_count: i64,
|
|
}
|
|
|
|
impl BlockDownloadsResponse {
|
|
/// Response for block downloads endpoint
|
|
pub fn new(block_hash: String, block_size: i64, downloads_count: i64) -> BlockDownloadsResponse {
|
|
BlockDownloadsResponse {
|
|
block_hash,
|
|
block_size,
|
|
downloads_count,
|
|
}
|
|
}
|
|
}
|
|
|