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
/*
* 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};
/// CoachLayout : coach layout providing data to draw a coach layout. The items of a coach are located via coordinates with (0,0) in the upper left corner. All coordinates are given without sign.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct CoachLayout {
/// id of this coachLayout on this server
#[serde(rename = "id")]
pub id: String,
/// A human-readable description of the coach layout.
#[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub summary: Option<Option<String>>,
/// list of places included in the layout
#[serde(rename = "places", skip_serializing_if = "Option::is_none")]
pub places: Option<Vec<models::CoachLayoutPlace>>,
#[serde(rename = "signs", skip_serializing_if = "Option::is_none")]
pub signs: Option<Vec<models::CoachLayoutSign>>,
#[serde(rename = "internals", skip_serializing_if = "Option::is_none")]
pub internals: Option<Vec<models::CoachLayoutInternal>>,
#[serde(rename = "directedInternals", skip_serializing_if = "Option::is_none")]
pub directed_internals: Option<Vec<models::CoachLayoutDirectedInternal>>,
#[serde(rename = "compartmentNumbers", skip_serializing_if = "Option::is_none")]
pub compartment_numbers: Option<Vec<models::CoachLayoutCompartmentNumber>>,
#[serde(rename = "gridSize")]
pub grid_size: Box<models::CoachLayoutGridSize>,
/// Java Property Name: 'links'
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub _links: Option<Vec<models::Link>>,
}
impl CoachLayout {
/// coach layout providing data to draw a coach layout. The items of a coach are located via coordinates with (0,0) in the upper left corner. All coordinates are given without sign.
pub fn new(id: String, grid_size: models::CoachLayoutGridSize) -> CoachLayout {
CoachLayout {
id,
summary: None,
places: None,
signs: None,
internals: None,
directed_internals: None,
compartment_numbers: None,
grid_size: Box::new(grid_size),
_links: None,
}
}
}