Skip to main content

blockfrost_openapi/models/
metrics_inner.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct MetricsInner {
6    /// Starting time of the call count interval (ends midnight UTC) in UNIX time
7    #[serde(rename = "time")]
8    pub time: i32,
9    /// Sum of all calls for a particular day
10    #[serde(rename = "calls")]
11    pub calls: i32,
12}
13
14impl MetricsInner {
15    pub fn new(time: i32, calls: i32) -> MetricsInner {
16        MetricsInner {
17            time,
18            calls,
19        }
20    }
21}
22