mobilitydata_client/models/external_id.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 ExternalId {
16 /// The ID that can be used to find the feed data in an external or legacy database. <ul> <li><b>JBDA</b>: Automatically imported from http://docs.gtfs-data.jp/api.v2.html. Pattern is jbda-<organisation_id>-<feed_id>.</li> <li><b>TDG</b>: Automatically imported from https://doc.transport.data.gouv.fr/outils/outils-disponibles-sur-le-pan/api. Pattern is tdg-<resource_id>.</li> <li><b>NTD</b>: Automatically imported from https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks. Pattern is ntd-<ntd_id>.</li> <li><b>TransitFeeds</b>: Automatically imported from old TransitFeeds website. Pattern is tfs-<feed_id>.</li> <li><b>Transit.land</b>: Imported from https://www.transit.land/documentation/rest-api/feeds. Pattern is tld-<feed_id>.</li> </ul>
17 #[serde(rename = "external_id", skip_serializing_if = "Option::is_none")]
18 pub external_id: Option<String>,
19 /// The source of the external ID, e.g. the name of the database where the external ID can be used.
20 #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
21 pub source: Option<String>,
22}
23
24impl ExternalId {
25 pub fn new() -> ExternalId {
26 ExternalId {
27 external_id: None,
28 source: None,
29 }
30 }
31}
32