Skip to main content

met_office_api/models/
properties.rs

1/*
2 * Global three hourly spot data
3 *
4 * This API provides three hourly weather forecast data for a requested coordinate defined by a latitude and longitude. The format of the data is GeoJSON.
5 *
6 * The version of the OpenAPI document: 1.0.1
7 * Contact: enquiries@metoffice.gov.uk
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct Properties {
16    /// The forecast location name
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// The distance from the requested point in metres
20    #[serde(rename = "requestPointDistance")]
21    pub request_point_distance: f32,
22    /// The model run date in UTC
23    #[serde(rename = "modelRunDate")]
24    pub model_run_date: String,
25    /// A time step ordered list  of forecast parameters and associated values
26    #[serde(rename = "timeSeries")]
27    pub time_series: Vec<crate::models::TimeSeries>,
28}
29
30impl Properties {
31    pub fn new(request_point_distance: f32, model_run_date: String, time_series: Vec<crate::models::TimeSeries>) -> Properties {
32        Properties {
33            name: None,
34            request_point_distance,
35            model_run_date,
36            time_series,
37        }
38    }
39}
40
41