motis_openapi_sdk/models/transfer.rs
1/*
2 * MOTIS API
3 *
4 * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used).
5 *
6 * The version of the OpenAPI document: v5
7 * Contact: felix@triptix.tech
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Transfer : transfer from one location to another
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Transfer {
17 #[serde(rename = "to")]
18 pub to: Box<models::Place>,
19 /// optional; missing if the GTFS did not contain a transfer transfer duration in minutes according to GTFS (+heuristics)
20 #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
21 pub default: Option<f64>,
22 /// optional; missing if no path was found (timetable / osr) transfer duration in minutes for the foot profile
23 #[serde(rename = "foot", skip_serializing_if = "Option::is_none")]
24 pub foot: Option<f64>,
25 /// optional; missing if no path was found with foot routing transfer duration in minutes for the foot profile
26 #[serde(rename = "footRouted", skip_serializing_if = "Option::is_none")]
27 pub foot_routed: Option<f64>,
28 /// optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile
29 #[serde(rename = "wheelchair", skip_serializing_if = "Option::is_none")]
30 pub wheelchair: Option<f64>,
31 /// optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile
32 #[serde(rename = "wheelchairRouted", skip_serializing_if = "Option::is_none")]
33 pub wheelchair_routed: Option<f64>,
34 /// optional; missing if no path was found with the wheelchair profile true if the wheelchair path uses an elevator
35 #[serde(rename = "wheelchairUsesElevator", skip_serializing_if = "Option::is_none")]
36 pub wheelchair_uses_elevator: Option<bool>,
37 /// optional; missing if no path was found with car routing transfer duration in minutes for the car profile
38 #[serde(rename = "car", skip_serializing_if = "Option::is_none")]
39 pub car: Option<f64>,
40}
41
42impl Transfer {
43 /// transfer from one location to another
44 pub fn new(to: models::Place) -> Transfer {
45 Transfer {
46 to: Box::new(to),
47 default: None,
48 foot: None,
49 foot_routed: None,
50 wheelchair: None,
51 wheelchair_routed: None,
52 wheelchair_uses_elevator: None,
53 car: None,
54 }
55 }
56}
57