use serde::Deserialize;
#[derive(Debug, Clone, Deserialize, Default)]
pub struct AccountData {
#[serde(default)]
pub account: serde_json::Value,
#[serde(default)]
pub project: serde_json::Value,
#[serde(default)]
pub subscription: serde_json::Value,
}
impl AccountData {
pub fn concurrent_limit(&self) -> u32 {
self.subscription
.pointer("/usage/scrape/concurrent_limit")
.and_then(|v| v.as_u64())
.map(|v| v as u32)
.unwrap_or(0)
}
}
#[derive(Debug, Clone, Deserialize, Default)]
pub struct VerifyApiKeyResult {
#[serde(default)]
pub valid: bool,
}