use serde::Deserialize;
use super::common::*;

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct IpGeolocationResponse {
    pub ip: Option<String>,
    pub country: Option<CountryInfo>,
    pub location: Option<Location>,
    pub network: Option<Network>,
    pub last_updated: Option<String>,
}

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct IpGeolocationWithConfidenceAreaResponse {
    pub ip: Option<String>,
    pub country: Option<CountryInfo>,
    pub location: Option<Location>,
    pub network: Option<Network>,
    pub confidence: Option<String>,
    pub confidence_area: Option<Vec<GeoPoint>>,
    pub last_updated: Option<String>,
}

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct IpGeolocationFullResponse {
    pub ip: Option<String>,
    pub country: Option<CountryInfo>,
    pub location: Option<Location>,
    pub network: Option<Network>,
    pub confidence: Option<String>,
    pub confidence_area: Option<Vec<GeoPoint>>,
    pub security_threat: Option<String>,
    pub hazard_report: Option<HazardReport>,
    pub last_updated: Option<String>,
}

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CountryByIpResponse {
    pub ip: Option<String>,
    pub country: Option<CountryInfo>,
}

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UserAgentResponse {
    pub user_agent_raw: Option<String>,
    pub user_agent_display: Option<String>,
    pub user_agent: Option<String>,
    pub device: Option<String>,
    pub os: Option<String>,
    pub is_mobile: Option<bool>,
    pub is_spider: Option<bool>,
}
