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
/*
* 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};
use serde_with::serde_as;
/// Line : terminalStation - in case the product requires a destination within the zone (e.g. local ticket to go to the main rail station). entryStation - Station to enter the zone in case the product requires to enter the zone via a specific station (e.g. local zone ticket to start from the main rail station).
#[serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct Line {
/// Id to support local traffic standards (e.g. VDV,...).
#[serde_as(as = "super::DoubleOption<serde_with::base64::Base64>")]
#[serde(rename = "binaryLineId", default, skip_serializing_if = "Option::is_none")]
pub binary_line_id: Option<Option<Vec<u8>>>,
/// Identifies a company. For rail, a RICS company code or compatible ERA company code are used. E.g.: 'urn:uic:rics:1185:000011'
#[serde(rename = "carrier")]
pub carrier: String,
#[serde(rename = "city", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub city: Option<Option<i32>>,
#[serde(rename = "entryStation", skip_serializing_if = "Option::is_none")]
pub entry_station: Option<Box<models::StopPlace>>,
#[serde(rename = "lineIds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub line_ids: Option<Option<Vec<String>>>,
#[serde(rename = "terminalStation", skip_serializing_if = "Option::is_none")]
pub terminal_station: Option<Box<models::StopPlace>>,
/// Nomenclature des units territoriales statistiques COMMISSION REGULATION (EU) No 31/2011
#[serde(rename = "nutsCode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub nuts_code: Option<Option<String>>,
}
impl Line {
/// terminalStation - in case the product requires a destination within the zone (e.g. local ticket to go to the main rail station). entryStation - Station to enter the zone in case the product requires to enter the zone via a specific station (e.g. local zone ticket to start from the main rail station).
pub fn new(carrier: String) -> Line {
Line {
binary_line_id: None,
carrier,
city: None,
entry_station: None,
line_ids: None,
terminal_station: None,
nuts_code: None,
}
}
}