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/*
* 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};
/// Flags : A block containing miscellaneous data for the API request.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Flags {
/// The models used to generate the forecast.
#[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<String>>,
#[serde(rename = "sourceTimes", skip_serializing_if = "Option::is_none")]
pub source_times: Option<Box<models::FlagsSourceTimes>>,
/// The distance to the nearest station (not implemented, always returns 0).
#[serde(rename = "nearest-station", skip_serializing_if = "Option::is_none")]
pub nearest_station: Option<i32>,
/// The units used in the forecasts.
#[serde(rename = "units", skip_serializing_if = "Option::is_none")]
pub units: Option<String>,
/// The version of Pirate Weather used to generate the forecast.
#[serde(rename = "version", skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
#[serde(rename = "sourceIDX", skip_serializing_if = "Option::is_none")]
pub source_idx: Option<Box<models::FlagsSourceIdx>>,
/// The time taken to process the request in milliseconds. Only returned when version>1.
#[serde(rename = "processTime", skip_serializing_if = "Option::is_none")]
pub process_time: Option<i32>,
/// The ingest version of Pirate Weather used to generate the forecast. Only returned when version>1.
#[serde(rename = "ingestVersion", skip_serializing_if = "Option::is_none")]
pub ingest_version: Option<String>,
/// The name of the closest city to your location. Only returned when version>1.
#[serde(rename = "nearestCity", skip_serializing_if = "Option::is_none")]
pub nearest_city: Option<String>,
/// The name of the closest country to your location. Only returned when version>1.
#[serde(rename = "nearestCountry", skip_serializing_if = "Option::is_none")]
pub nearest_country: Option<String>,
/// The name of the closest state or province to your location. Only returned when version>1.
#[serde(rename = "nearestSubNational", skip_serializing_if = "Option::is_none")]
pub nearest_sub_national: Option<String>,
}
impl Flags {
/// A block containing miscellaneous data for the API request.
pub fn new() -> Flags {
Flags {
sources: None,
source_times: None,
nearest_station: None,
units: None,
version: None,
source_idx: None,
process_time: None,
ingest_version: None,
nearest_city: None,
nearest_country: None,
nearest_sub_national: None,
}
}
}