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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DailyDataInner {
/// The time of the data point in UNIX format.
#[serde(rename = "time", skip_serializing_if = "Option::is_none")]
pub time: Option<i32>,
/// A summary of the weather.
#[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
pub summary: Option<String>,
/// An icon representing the weather.
#[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
pub icon: Option<String>,
/// The time when the sun is a specific (6 degrees) height above the horizon after sunrise. Only returned when version>1.
#[serde(rename = "dawnTime", skip_serializing_if = "Option::is_none")]
pub dawn_time: Option<i32>,
/// The time of sunrise in UNIX format.
#[serde(rename = "sunriseTime", skip_serializing_if = "Option::is_none")]
pub sunrise_time: Option<i32>,
/// The time of sunset in UNIX format.
#[serde(rename = "sunsetTime", skip_serializing_if = "Option::is_none")]
pub sunset_time: Option<i32>,
/// The time when the sun is a specific (6 degrees) height above the horizon before sunset. Only returned when version>1.
#[serde(rename = "duskTime", skip_serializing_if = "Option::is_none")]
pub dusk_time: Option<i32>,
/// The fractional lunation number for the given day.
#[serde(rename = "moonPhase", skip_serializing_if = "Option::is_none")]
pub moon_phase: Option<f64>,
/// The intensity of precipitation.
#[serde(rename = "precipIntensity", skip_serializing_if = "Option::is_none")]
pub precip_intensity: Option<f64>,
/// The maximum intensity of precipitation.
#[serde(rename = "precipIntensityMax", skip_serializing_if = "Option::is_none")]
pub precip_intensity_max: Option<f64>,
/// The time when the maximum precipitation intensity occurs in UNIX format.
#[serde(
rename = "precipIntensityMaxTime",
skip_serializing_if = "Option::is_none"
)]
pub precip_intensity_max_time: Option<i32>,
/// The probability of precipitation.
#[serde(rename = "precipProbability", skip_serializing_if = "Option::is_none")]
pub precip_probability: Option<f64>,
/// The total amount of precipitation.
#[serde(rename = "precipAccumulation", skip_serializing_if = "Option::is_none")]
pub precip_accumulation: Option<f64>,
/// The type of precipitation occurring.
#[serde(rename = "precipType", skip_serializing_if = "Option::is_none")]
pub precip_type: Option<String>,
/// The daytime high temperature.
#[serde(rename = "temperatureHigh", skip_serializing_if = "Option::is_none")]
pub temperature_high: Option<f64>,
/// The time when the high temperature occurs in UNIX format.
#[serde(
rename = "temperatureHighTime",
skip_serializing_if = "Option::is_none"
)]
pub temperature_high_time: Option<i32>,
/// The overnight low temperature.
#[serde(rename = "temperatureLow", skip_serializing_if = "Option::is_none")]
pub temperature_low: Option<f64>,
/// The time when the low temperature occurs in UNIX format.
#[serde(rename = "temperatureLowTime", skip_serializing_if = "Option::is_none")]
pub temperature_low_time: Option<i32>,
/// The apparent daytime high temperature (feels like).
#[serde(
rename = "apparentTemperatureHigh",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_high: Option<f64>,
/// The time when the apparent high temperature occurs in UNIX format.
#[serde(
rename = "apparentTemperatureHighTime",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_high_time: Option<i32>,
/// The apparent overnight low temperature (feels like).
#[serde(
rename = "apparentTemperatureLow",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_low: Option<f64>,
/// The time when the apparent low temperature occurs in UNIX format.
#[serde(
rename = "apparentTemperatureLowTime",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_low_time: Option<i32>,
/// 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 air pressure.
#[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 time when the maximum wind gust occurs in UNIX format.
#[serde(rename = "windGustTime", skip_serializing_if = "Option::is_none")]
pub wind_gust_time: Option<i32>,
/// 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 max UV index during that day.
#[serde(rename = "uvIndex", skip_serializing_if = "Option::is_none")]
pub uv_index: Option<f64>,
/// The time when the maximum UV index occurs in UNIX format.
#[serde(rename = "uvIndexTime", skip_serializing_if = "Option::is_none")]
pub uv_index_time: Option<i32>,
/// The visibility in kilometers.
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<f64>,
/// The minimum temperature.
#[serde(rename = "temperatureMin", skip_serializing_if = "Option::is_none")]
pub temperature_min: Option<f64>,
/// The time when the minimum temperature occurs in UNIX format.
#[serde(rename = "temperatureMinTime", skip_serializing_if = "Option::is_none")]
pub temperature_min_time: Option<i32>,
/// The maximum temperature.
#[serde(rename = "temperatureMax", skip_serializing_if = "Option::is_none")]
pub temperature_max: Option<f64>,
/// The time when the maximum temperature occurs in UNIX format.
#[serde(rename = "temperatureMaxTime", skip_serializing_if = "Option::is_none")]
pub temperature_max_time: Option<i32>,
/// The minimum apparent temperature (feels like).
#[serde(
rename = "apparentTemperatureMin",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_min: Option<f64>,
/// The time when the minimum apparent temperature occurs in UNIX format.
#[serde(
rename = "apparentTemperatureMinTime",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_min_time: Option<i32>,
/// The maximum apparent temperature (feels like).
#[serde(
rename = "apparentTemperatureMax",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_max: Option<f64>,
/// The time when the maximum apparent temperature occurs in UNIX format.
#[serde(
rename = "apparentTemperatureMaxTime",
skip_serializing_if = "Option::is_none"
)]
pub apparent_temperature_max_time: Option<i32>,
/// The maximum amount of near-surface smoke in ug/m^3. Only returned when version>1.
#[serde(rename = "smokeMax", skip_serializing_if = "Option::is_none")]
pub smoke_max: Option<f64>,
/// The time when the maximum near-surface smoke occurs in UNIX format. Only returned when version>1.
#[serde(rename = "smokeMaxTime", skip_serializing_if = "Option::is_none")]
pub smoke_max_time: Option<i32>,
/// The amount of liquid precipitation expected. Only returned when version>1.
#[serde(rename = "liquidAccumulation", skip_serializing_if = "Option::is_none")]
pub liquid_accumulation: Option<f64>,
/// The amount of snow precipitation expected. Only returned when version>1.
#[serde(rename = "snowAccumulation", skip_serializing_if = "Option::is_none")]
pub snow_accumulation: Option<f64>,
/// The amount of ice precipitation expected. Only returned when version>1.
#[serde(rename = "iceAccumulation", skip_serializing_if = "Option::is_none")]
pub ice_accumulation: Option<f64>,
/// The maximum Fosburg fire index. Only returned when version>1.
#[serde(rename = "fireIndexMax", skip_serializing_if = "Option::is_none")]
pub fire_index_max: Option<f64>,
/// The time when the maximum Fosburg fire index occurs in UNIX format. Only returned when version>1.
#[serde(rename = "fireIndexMaxTime", skip_serializing_if = "Option::is_none")]
pub fire_index_max_time: Option<i32>,
/// 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 time when the maximum solar occurs in UNIX format. Only returned when version>1.
#[serde(rename = "solarMax", skip_serializing_if = "Option::is_none")]
pub solar_max: 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>,
/// The time when the maximum CAPE occurs in UNIX format. Only returned when version>1.
#[serde(rename = "capeMax", skip_serializing_if = "Option::is_none")]
pub cape_max: Option<i32>,
}
impl DailyDataInner {
pub fn new() -> DailyDataInner {
DailyDataInner {
time: None,
summary: None,
icon: None,
dawn_time: None,
sunrise_time: None,
sunset_time: None,
dusk_time: None,
moon_phase: None,
precip_intensity: None,
precip_intensity_max: None,
precip_intensity_max_time: None,
precip_probability: None,
precip_accumulation: None,
precip_type: None,
temperature_high: None,
temperature_high_time: None,
temperature_low: None,
temperature_low_time: None,
apparent_temperature_high: None,
apparent_temperature_high_time: None,
apparent_temperature_low: None,
apparent_temperature_low_time: None,
dew_point: None,
humidity: None,
pressure: None,
wind_speed: None,
wind_gust: None,
wind_gust_time: None,
wind_bearing: None,
cloud_cover: None,
uv_index: None,
uv_index_time: None,
visibility: None,
temperature_min: None,
temperature_min_time: None,
temperature_max: None,
temperature_max_time: None,
apparent_temperature_min: None,
apparent_temperature_min_time: None,
apparent_temperature_max: None,
apparent_temperature_max_time: None,
smoke_max: None,
smoke_max_time: None,
liquid_accumulation: None,
snow_accumulation: None,
ice_accumulation: None,
fire_index_max: None,
fire_index_max_time: None,
solar: None,
solar_max: None,
cape: None,
cape_max: None,
}
}
}