Skip to main content

mobilitydata_client/models/
latest_dataset.rs

1/*
2 * Mobility Database Catalog
3 *
4 * API for the Mobility Database Catalog. See [https://mobilitydatabase.org/](https://mobilitydatabase.org/).  The Mobility Database API uses OAuth2 authentication. To initiate a successful API request, an access token must be included as a bearer token in the HTTP header. Access tokens are valid for one hour. To obtain an access token, you'll first need a refresh token, which is long-lived and does not expire. 
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * Contact: api@mobilitydata.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct LatestDataset {
16    /// Identifier of the latest dataset for this feed.
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    /// As a convenience, the URL of the latest uploaded dataset hosted by MobilityData.  It should be the same URL as the one found in the latest dataset id dataset. An alternative way to find this is to use the latest dataset id to obtain the dataset and then use its hosted_url. 
20    #[serde(rename = "hosted_url", skip_serializing_if = "Option::is_none")]
21    pub hosted_url: Option<String>,
22    #[serde(rename = "bounding_box", skip_serializing_if = "Option::is_none")]
23    pub bounding_box: Option<Box<models::BoundingBox>>,
24    /// The date and time the dataset was downloaded from the producer, in ISO 8601 date-time format.
25    #[serde(rename = "downloaded_at", skip_serializing_if = "Option::is_none")]
26    pub downloaded_at: Option<String>,
27    /// A hash of the dataset.
28    #[serde(rename = "hash", skip_serializing_if = "Option::is_none")]
29    pub hash: Option<String>,
30    /// The start date of the service date range for the dataset in UTC. Timing starts at 00:00:00 of the day.
31    #[serde(rename = "service_date_range_start", skip_serializing_if = "Option::is_none")]
32    pub service_date_range_start: Option<String>,
33    /// The start date of the service date range for the dataset in UTC. Timing ends at 23:59:59 of the day.
34    #[serde(rename = "service_date_range_end", skip_serializing_if = "Option::is_none")]
35    pub service_date_range_end: Option<String>,
36    /// The timezone of the agency.
37    #[serde(rename = "agency_timezone", skip_serializing_if = "Option::is_none")]
38    pub agency_timezone: Option<String>,
39    /// The size of the zipped folder in MB.
40    #[serde(rename = "zipped_folder_size_mb", skip_serializing_if = "Option::is_none")]
41    pub zipped_folder_size_mb: Option<f64>,
42    /// The size of the unzipped folder in MB.
43    #[serde(rename = "unzipped_folder_size_mb", skip_serializing_if = "Option::is_none")]
44    pub unzipped_folder_size_mb: Option<f64>,
45    #[serde(rename = "validation_report", skip_serializing_if = "Option::is_none")]
46    pub validation_report: Option<Box<models::LatestDatasetValidationReport>>,
47}
48
49impl LatestDataset {
50    pub fn new() -> LatestDataset {
51        LatestDataset {
52            id: None,
53            hosted_url: None,
54            bounding_box: None,
55            downloaded_at: None,
56            hash: None,
57            service_date_range_start: None,
58            service_date_range_end: None,
59            agency_timezone: None,
60            zipped_folder_size_mb: None,
61            unzipped_folder_size_mb: None,
62            validation_report: None,
63        }
64    }
65}
66