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
/*
* 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};
/// Transportable : Transportables which are handled similar to passengers like dogs, bicycles, car transport. These transportables might need a ticket or reservation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct Transportable {
/// Subset of the values from the [Passenger Type Code List](https://osdm.io/spec/catalog-of-code-lists/#PassengerType) Listed values here are examples.
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "car", skip_serializing_if = "Option::is_none")]
pub car: Option<Box<models::Car>>,
#[serde(rename = "motorCycle", skip_serializing_if = "Option::is_none")]
pub motor_cycle: Option<Box<models::MotorCycle>>,
#[serde(rename = "trailer", skip_serializing_if = "Option::is_none")]
pub trailer: Option<Box<models::Car>>,
}
impl Transportable {
/// Transportables which are handled similar to passengers like dogs, bicycles, car transport. These transportables might need a ticket or reservation.
pub fn new(r#type: String) -> Transportable {
Transportable {
r#type,
car: None,
motor_cycle: None,
trailer: None,
}
}
}