osdm_sys/models/stop_place.rs
1/*
2 * UIC 90918-10 - OSDM
3 *
4 * Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information. The following resources are key to get started: - [Processes](https://osdm.io/spec/processes/) - [Models](https://osdm.io/spec/models/) - [Getting started](https://osdm.io/spec/getting-started/)
5 *
6 * The version of the OpenAPI document: 3.7.0
7 * Contact: osdm@uic.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// StopPlace : A place extended by accessibility limitation properties and some attributes of the associated equipment, comprising one or more places where vehicles may stop and where passengers may board or leave vehicles or prepare their trip, and which will usually have one or more wellknown names. Provided by OJP.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct StopPlace {
17 /// Attribute is used as discriminator for inheritance between data types.
18 #[serde(rename = "objectType")]
19 pub object_type: String,
20 /// id defining the place. The code is provided as URN, relative URNs are allowed with base path urn:uic:stn '0850000'
21 #[serde(rename = "id")]
22 pub id: String,
23 /// For a place with ids in different reference systems, the alternative ids can be returned. The reference system is encoded in the string. E.g.: 'urn:uic:std:80000', 'x_swe:stn:10000', 'ch:1:sloid:343434'
24 #[serde(rename = "alternativeIds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25 pub alternative_ids: Option<Option<Vec<String>>>,
26 #[serde(rename = "geoPosition", skip_serializing_if = "Option::is_none")]
27 pub geo_position: Option<Box<models::GeoPosition>>,
28 #[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
29 pub r#ref: Option<Box<models::PlaceRef>>,
30 /// Java Property Name: 'links'
31 #[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
32 pub _links: Option<Vec<models::Link>>,
33 /// Name of this stop place for use in passenger information.
34 #[serde(rename = "name")]
35 pub name: String,
36}
37
38impl StopPlace {
39 /// A place extended by accessibility limitation properties and some attributes of the associated equipment, comprising one or more places where vehicles may stop and where passengers may board or leave vehicles or prepare their trip, and which will usually have one or more wellknown names. Provided by OJP.
40 pub fn new(object_type: String, id: String, name: String) -> StopPlace {
41 StopPlace {
42 object_type,
43 id,
44 alternative_ids: None,
45 geo_position: None,
46 r#ref: None,
47 _links: None,
48 name,
49 }
50 }
51}
52