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/*
* Pirate Weather API
*
* Pirate Weather provides an open, free, and documented source of government weather data.
*
* The version of the OpenAPI document: 2.9.0
* 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 HourlyDataInner {
/// 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 intensity of precipitation.
#[serde(rename = "precipIntensity", skip_serializing_if = "Option::is_none")]
pub precip_intensity: Option<f64>,
/// The probability of precipitation.
#[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 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 intensity of rain precipitation. Only returned when version>1.
#[serde(rename = "rainIntensity", skip_serializing_if = "Option::is_none")]
pub rain_intensity: Option<f64>,
/// The intensity of snow precipitation. Only returned when version>1.
#[serde(rename = "snowIntensity", skip_serializing_if = "Option::is_none")]
pub snow_intensity: Option<f64>,
/// The intensity of ice precipitation. Only returned when version>1.
#[serde(rename = "iceIntensity", skip_serializing_if = "Option::is_none")]
pub ice_intensity: Option<f64>,
/// 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 air pressure.
#[serde(rename = "pressure", skip_serializing_if = "Option::is_none")]
pub pressure: Option<f64>,
/// The station pressure. Only returned when extraVars contains stationPressure.
#[serde(rename = "stationPressure", skip_serializing_if = "Option::is_none")]
pub station_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<i32>,
/// 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.
#[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/m3. Only returned when version>1.
#[serde(rename = "smoke", skip_serializing_if = "Option::is_none")]
pub smoke: Option<f64>,
/// 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 distance to the nearest storm.
#[serde(
rename = "nearestStormDistance",
skip_serializing_if = "Option::is_none"
)]
pub nearest_storm_distance: Option<f64>,
/// The direction to the nearest storm.
#[serde(
rename = "nearestStormBearing",
skip_serializing_if = "Option::is_none"
)]
pub nearest_storm_bearing: Option<i32>,
/// 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 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 HourlyDataInner {
pub fn new() -> HourlyDataInner {
HourlyDataInner {
time: None,
summary: None,
icon: None,
precip_intensity: None,
precip_probability: None,
precip_intensity_error: None,
precip_accumulation: None,
precip_type: None,
rain_intensity: None,
snow_intensity: None,
ice_intensity: None,
temperature: None,
apparent_temperature: None,
dew_point: None,
humidity: None,
pressure: None,
station_pressure: None,
wind_speed: None,
wind_gust: None,
wind_bearing: None,
cloud_cover: None,
uv_index: None,
visibility: None,
ozone: None,
smoke: None,
liquid_accumulation: None,
snow_accumulation: None,
ice_accumulation: None,
nearest_storm_distance: None,
nearest_storm_bearing: None,
fire_index: None,
feels_like: None,
solar: None,
cape: None,
}
}
}