use serde::Deserialize;
#[derive(Deserialize, Debug)]
pub struct Coord {
pub lon: f64,
pub lat: f64,
}
#[derive(Deserialize, Debug)]
pub struct Weather {
pub id: u64,
pub main: String,
pub description: String,
pub icon: String,
}
#[derive(Deserialize, Debug)]
pub struct Main {
pub temp: f64,
pub feels_like: f64,
pub pressure: f64,
pub humidity: f64,
pub temp_min: f64,
pub temp_max: f64,
pub sea_level: Option<f64>,
pub grnd_level: Option<f64>,
}
#[derive(Deserialize, Debug)]
pub struct Wind {
pub speed: f64,
pub deg: f64,
pub gust: Option<f64>,
}
#[derive(Deserialize, Debug)]
pub struct Clouds {
pub all: f64,
}
#[derive(Deserialize, Debug)]
pub struct Volume {
#[serde(rename = "1h")]
pub h1: Option<f64>,
#[serde(rename = "3h")]
pub h3: Option<f64>,
}
#[derive(Deserialize, Debug)]
pub struct Sys {
#[serde(rename = "type")]
pub type_: Option<u64>,
pub id: Option<u64>,
pub message: Option<f64>,
pub country: String,
pub sunrise: i64,
pub sunset: i64,
}
#[derive(Deserialize, Debug)]
pub struct CurrentWeather {
pub coord: Coord,
pub weather: Vec<Weather>,
pub base: String,
pub main: Main,
pub visibility: u64,
pub wind: Wind,
pub clouds: Clouds,
pub rain: Option<Volume>,
pub snow: Option<Volume>,
pub dt: i64,
pub sys: Sys,
pub timezone: i64,
pub id: u64,
pub name: String,
pub cod: u64,
}