use serde::Serialize;
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct IcDailyStatsQuery {
pub start_unix_secs: u64,
pub end_unix_secs: u64,
}
impl IcDailyStatsQuery {
#[must_use]
pub const fn new(start_unix_secs: u64, end_unix_secs: u64) -> Self {
Self {
start_unix_secs,
end_unix_secs,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IcDailyStatsRequest {
pub source_endpoint: String,
pub now_unix_secs: u64,
pub query: IcDailyStatsQuery,
}
impl IcDailyStatsRequest {
#[must_use]
pub fn new(
source_endpoint: impl Into<String>,
now_unix_secs: u64,
query: IcDailyStatsQuery,
) -> Self {
Self {
source_endpoint: source_endpoint.into(),
now_unix_secs,
query,
}
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IcBoundaryNodeDataCentersRequest {
pub source_endpoint: String,
pub now_unix_secs: u64,
}
impl IcBoundaryNodeDataCentersRequest {
#[must_use]
pub fn new(source_endpoint: impl Into<String>, now_unix_secs: u64) -> Self {
Self {
source_endpoint: source_endpoint.into(),
now_unix_secs,
}
}
}