Skip to main content

blockfrost_openapi/models/
metrics_endpoints_inner.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct MetricsEndpointsInner {
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 and endpoint
10    #[serde(rename = "calls")]
11    pub calls: i32,
12    /// Endpoint parent name
13    #[serde(rename = "endpoint")]
14    pub endpoint: String,
15}
16
17impl MetricsEndpointsInner {
18    pub fn new(time: i32, calls: i32, endpoint: String) -> MetricsEndpointsInner {
19        MetricsEndpointsInner {
20            time,
21            calls,
22            endpoint,
23        }
24    }
25}
26