๐Ÿ“ฆ rparrett / weather_dashboard

๐Ÿ“„ weather_200_response.rs ยท 66 lines
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/*
 * 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 Weather200Response {
    /// The requested latitude.
    #[serde(rename = "latitude", skip_serializing_if = "Option::is_none")]
    pub latitude: Option<f64>,
    /// The requested longitude.
    #[serde(rename = "longitude", skip_serializing_if = "Option::is_none")]
    pub longitude: Option<f64>,
    /// The timezone name for the requested location.
    #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")]
    pub timezone: Option<String>,
    /// The timezone offset in hours.
    #[serde(rename = "offset", skip_serializing_if = "Option::is_none")]
    pub offset: Option<f64>,
    /// The elevation in meters of the forecast point.
    #[serde(rename = "elevation", skip_serializing_if = "Option::is_none")]
    pub elevation: Option<f64>,
    #[serde(rename = "currently", skip_serializing_if = "Option::is_none")]
    pub currently: Option<Box<models::Currently>>,
    #[serde(rename = "minutely", skip_serializing_if = "Option::is_none")]
    pub minutely: Option<Box<models::Minutely>>,
    #[serde(rename = "hourly", skip_serializing_if = "Option::is_none")]
    pub hourly: Option<Box<models::Hourly>>,
    #[serde(rename = "day_night", skip_serializing_if = "Option::is_none")]
    pub day_night: Option<Box<models::DayNight>>,
    #[serde(rename = "daily", skip_serializing_if = "Option::is_none")]
    pub daily: Option<Box<models::Daily>>,
    /// A block containing any severe weather alerts for the current location.
    #[serde(rename = "alerts", skip_serializing_if = "Option::is_none")]
    pub alerts: Option<Vec<models::AlertsInner>>,
    #[serde(rename = "flags", skip_serializing_if = "Option::is_none")]
    pub flags: Option<Box<models::Flags>>,
}

impl Weather200Response {
    pub fn new() -> Weather200Response {
        Weather200Response {
            latitude: None,
            longitude: None,
            timezone: None,
            offset: None,
            elevation: None,
            currently: None,
            minutely: None,
            hourly: None,
            day_night: None,
            daily: None,
            alerts: None,
            flags: None,
        }
    }
}