1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
* UIC 90918-10 - OSDM
*
* 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/)
*
* The version of the OpenAPI document: 3.7.0
* Contact: osdm@uic.org
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Place : A geographic place of any type which may be specified as the origin or destination of a trip. Provided by OJP.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[serde(tag = "objectType")]
pub enum Place {
#[serde(rename = "Address")]
Address {
/// id defining the place. The code is provided as URN, relative URNs are allowed with base path urn:uic:stn '0850000'
#[serde(rename = "id")]
id: String,
/// 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'
#[serde(rename = "alternativeIds", skip_serializing_if = "Option::is_none")]
alternative_ids: Option<Vec<String>>,
#[serde(rename = "geoPosition", skip_serializing_if = "Option::is_none")]
geo_position: Option<Box<models::GeoPosition>>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
r#ref: Option<Box<models::PlaceRef>>,
/// Java Property Name: 'links'
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
_links: Option<Vec<models::Link>>,
},
#[serde(rename = "FareConnectionPoint")]
FareConnectionPoint {
/// id defining the place. The code is provided as URN, relative URNs are allowed with base path urn:uic:stn '0850000'
#[serde(rename = "id")]
id: String,
/// 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'
#[serde(rename = "alternativeIds", skip_serializing_if = "Option::is_none")]
alternative_ids: Option<Vec<String>>,
#[serde(rename = "geoPosition", skip_serializing_if = "Option::is_none")]
geo_position: Option<Box<models::GeoPosition>>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
r#ref: Option<Box<models::PlaceRef>>,
/// Java Property Name: 'links'
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
_links: Option<Vec<models::Link>>,
},
#[serde(rename = "PointOfInterest")]
PointOfInterest {
/// id defining the place. The code is provided as URN, relative URNs are allowed with base path urn:uic:stn '0850000'
#[serde(rename = "id")]
id: String,
/// 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'
#[serde(rename = "alternativeIds", skip_serializing_if = "Option::is_none")]
alternative_ids: Option<Vec<String>>,
#[serde(rename = "geoPosition", skip_serializing_if = "Option::is_none")]
geo_position: Option<Box<models::GeoPosition>>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
r#ref: Option<Box<models::PlaceRef>>,
/// Java Property Name: 'links'
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
_links: Option<Vec<models::Link>>,
},
#[serde(rename = "StopPlace")]
StopPlace {
/// Name of this stop place for use in passenger information.
#[serde(rename = "name")]
name: String,
/// id defining the place. The code is provided as URN, relative URNs are allowed with base path urn:uic:stn '0850000'
#[serde(rename = "id")]
id: String,
/// 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'
#[serde(rename = "alternativeIds", skip_serializing_if = "Option::is_none")]
alternative_ids: Option<Vec<String>>,
#[serde(rename = "geoPosition", skip_serializing_if = "Option::is_none")]
geo_position: Option<Box<models::GeoPosition>>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
r#ref: Option<Box<models::PlaceRef>>,
/// Java Property Name: 'links'
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
_links: Option<Vec<models::Link>>,
},
}
impl Default for Place {
fn default() -> Self {
Self::Address {
id: Default::default(),
alternative_ids: Default::default(),
geo_position: Default::default(),
r#ref: Default::default(),
_links: Default::default(),
}
}
}