1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158/*
* Pirate Weather API
*
* Pirate Weather provides an open, free, and documented source of government weather data.
*
* The version of the OpenAPI document: 2.8
* Contact: mail@pirateweather.net
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Currently : A block containing the current weather for the requested location.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Currently {
/// The current time in UNIX format.
#[serde(rename = "time", skip_serializing_if = "Option::is_none")]
pub time: Option<i32>,
/// A human-readable summary of the current weather.
#[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
pub summary: Option<String>,
/// An icon representing the current weather.
#[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
pub icon: Option<String>,
/// The distance to the nearest storm in kilometers.
#[serde(
rename = "nearestStormDistance",
skip_serializing_if = "Option::is_none"
)]
pub nearest_storm_distance: Option<f64>,
/// The direction to the nearest storm in degrees.
#[serde(
rename = "nearestStormBearing",
skip_serializing_if = "Option::is_none"
)]
pub nearest_storm_bearing: Option<i32>,
/// The intensity of liquid water equivalent precipitation in millimeters per hour.
#[serde(rename = "precipIntensity", skip_serializing_if = "Option::is_none")]
pub precip_intensity: Option<f64>,
/// The probability of precipitation occurring.
#[serde(rename = "precipProbability", skip_serializing_if = "Option::is_none")]
pub precip_probability: Option<f64>,
/// The standard deviation of the precipitation intensity.
#[serde(
rename = "precipIntensityError",
skip_serializing_if = "Option::is_none"
)]
pub precip_intensity_error: Option<f64>,
/// The type of precipitation occurring.
#[serde(rename = "precipType", skip_serializing_if = "Option::is_none")]
pub precip_type: Option<String>,
/// The air temperature.
#[serde(rename = "temperature", skip_serializing_if = "Option::is_none")]
pub temperature: Option<f64>,
/// The apparent temperature (feels like).
#[serde(
rename = "apparentTemperature",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature: Option<f64>,
/// The dew point temperature.
#[serde(rename = "dewPoint", skip_serializing_if = "Option::is_none")]
pub dew_point: Option<f64>,
/// The relative humidity.
#[serde(rename = "humidity", skip_serializing_if = "Option::is_none")]
pub humidity: Option<f64>,
/// The sea-level pressure in hectopascals.
#[serde(rename = "pressure", skip_serializing_if = "Option::is_none")]
pub pressure: Option<f64>,
/// The wind speed.
#[serde(rename = "windSpeed", skip_serializing_if = "Option::is_none")]
pub wind_speed: Option<f64>,
/// The wind gust speed.
#[serde(rename = "windGust", skip_serializing_if = "Option::is_none")]
pub wind_gust: Option<f64>,
/// The direction of the wind in degrees.
#[serde(rename = "windBearing", skip_serializing_if = "Option::is_none")]
pub wind_bearing: Option<f64>,
/// The fraction of the sky covered by clouds.
#[serde(rename = "cloudCover", skip_serializing_if = "Option::is_none")]
pub cloud_cover: Option<f64>,
/// The UV index.
#[serde(rename = "uvIndex", skip_serializing_if = "Option::is_none")]
pub uv_index: Option<f64>,
/// The visibility in kilometers.
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<f64>,
/// The ozone concentration in Dobson units.
#[serde(rename = "ozone", skip_serializing_if = "Option::is_none")]
pub ozone: Option<f64>,
/// The amount of near-surface smoke in ug/m^3. Only returned when version>1.
#[serde(rename = "smoke", skip_serializing_if = "Option::is_none")]
pub smoke: Option<f64>,
/// The Fosburg fire index. Only returned when version>1.
#[serde(rename = "fireIndex", skip_serializing_if = "Option::is_none")]
pub fire_index: Option<f64>,
/// The apparent temperature reported by NBM and gfs. Only returned when version>1.
#[serde(rename = "feelsLike", skip_serializing_if = "Option::is_none")]
pub feels_like: Option<f64>,
/// The ice precipitation that has accumulated so far during the day, from midnight until the forecast request time. Only returned when version>1.
#[serde(rename = "currentDayIce", skip_serializing_if = "Option::is_none")]
pub current_day_ice: Option<f64>,
/// The liquid precipitation that has accumulated so far during the day, from midnight until the forecast request time. Only returned when version>1.
#[serde(rename = "currentDayLiquid", skip_serializing_if = "Option::is_none")]
pub current_day_liquid: Option<f64>,
/// The snow precipitation that has accumulated so far during the day, from midnight until the forecast request time. Only returned when version>1.
#[serde(rename = "currentDaySnow", skip_serializing_if = "Option::is_none")]
pub current_day_snow: Option<f64>,
/// The station pressure hectopascals. Only returned when extraVars contains stationPressure.
#[serde(rename = "stationPressure", skip_serializing_if = "Option::is_none")]
pub station_pressure: Option<f64>,
/// The Downward Short-Wave Radiation Flux measured in W/m^2. Only returned when version>1.
#[serde(rename = "solar", skip_serializing_if = "Option::is_none")]
pub solar: Option<f64>,
/// The Convective Available Potential Energy measured in J/kg. Only returned when version>1.
#[serde(rename = "cape", skip_serializing_if = "Option::is_none")]
pub cape: Option<i32>,
}
impl Currently {
/// A block containing the current weather for the requested location.
pub fn new() -> Currently {
Currently {
time: None,
summary: None,
icon: None,
nearest_storm_distance: None,
nearest_storm_bearing: None,
precip_intensity: None,
precip_probability: None,
precip_intensity_error: None,
precip_type: None,
temperature: None,
apparent_temperature: None,
dew_point: None,
humidity: None,
pressure: None,
wind_speed: None,
wind_gust: None,
wind_bearing: None,
cloud_cover: None,
uv_index: None,
visibility: None,
ozone: None,
smoke: None,
fire_index: None,
feels_like: None,
current_day_ice: None,
current_day_liquid: None,
current_day_snow: None,
station_pressure: None,
solar: None,
cape: None,
}
}
}