osdm_sys/models/
coach_deck_layout.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/// CoachDeckLayout : A deck of a coach. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CoachDeckLayout {
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "dimension")]
20    pub dimension: Box<models::GridDimension>,
21    /// Typically set on the lowest deck. Empty if unknown. 
22    #[serde(rename = "lowFloorEntry", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub low_floor_entry: Option<Option<bool>>,
24    #[serde(rename = "id")]
25    pub id: String,
26    #[serde(rename = "deckLevel")]
27    pub deck_level: String,
28    /// Groups places. No place groups might exist for special coach types (e.g. traction units without seats). 
29    #[serde(rename = "placeGroups", skip_serializing_if = "Option::is_none")]
30    pub place_groups: Option<Vec<models::PlaceGroup>>,
31    #[serde(rename = "graphicElements", skip_serializing_if = "Option::is_none")]
32    pub graphic_elements: Option<Vec<models::GraphicElement>>,
33    #[serde(rename = "serviceIcons", skip_serializing_if = "Option::is_none")]
34    pub service_icons: Option<Vec<models::ServiceIcon>>,
35}
36
37impl CoachDeckLayout {
38    /// A deck of a coach. 
39    pub fn new(name: String, dimension: models::GridDimension, id: String, deck_level: String) -> CoachDeckLayout {
40        CoachDeckLayout {
41            name,
42            dimension: Box::new(dimension),
43            low_floor_entry: None,
44            id,
45            deck_level,
46            place_groups: None,
47            graphic_elements: None,
48            service_icons: None,
49        }
50    }
51}
52