gistools/readers/gbfs/schema_v1/gbfs_versions.rs
1use alloc::{string::String, vec::Vec};
2use serde::{Deserialize, Serialize};
3
4use crate::readers::GBFSVersion;
5
6/// # GBFS Versions Schema V1.1
7/// Lists all feed endpoints published according to versions of the GBFS documentation.
8///
9/// ## Links
10/// - [GBFS Specification V1.1](https://github.com/MobilityData/gbfs/blob/v1.1/gbfs.md#gbfs_versionsjson-added-in-v11)
11pub type GBFSVersionsV1 = GBFSVersionsV11;
12
13/// GBFS Versions Data scheme V1.1
14#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)]
15pub struct GBFSVersionsDataV11 {
16 /// Data containing available feed versions
17 pub versions: Vec<GBFSVersion>,
18}
19
20/// GBFS Versions Schema V1.1 Interface
21#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)]
22pub struct GBFSVersionsV11 {
23 /// Last time the data in the feed was updated in POSIX time.
24 pub last_updated: u64,
25 /// Number of seconds before the data in the feed will be updated again.
26 pub ttl: u64,
27 /// GBFS version number (1.1).
28 pub version: String,
29 /// Data containing available feed versions.
30 pub data: GBFSVersionsDataV11,
31}