osdm_sys/models/
coach_layout_directed_internal.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
16pub struct CoachLayoutDirectedInternal {
17 #[serde(rename = "icon")]
19 pub icon: String,
20 #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
21 pub direction: Option<models::DirectionType>,
22 #[serde(rename = "mounting", skip_serializing_if = "Option::is_none")]
23 pub mounting: Option<models::MountingType>,
24 #[serde(rename = "coords")]
25 pub coords: Box<models::LayoutCoordinates>,
26}
27
28impl CoachLayoutDirectedInternal {
29 pub fn new(icon: String, coords: models::LayoutCoordinates) -> CoachLayoutDirectedInternal {
30 CoachLayoutDirectedInternal {
31 icon,
32 direction: None,
33 mounting: None,
34 coords: Box::new(coords),
35 }
36 }
37}
38