osdm_sys/models/
alight.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Alight {
17 #[serde(rename = "stopPlaceRef")]
18 pub stop_place_ref: Box<models::StopPlaceRef>,
19 #[serde(rename = "stopPlaceName")]
20 pub stop_place_name: String,
21 #[serde(rename = "plannedStopPointName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23 pub planned_stop_point_name: Option<Option<String>>,
24 #[serde(rename = "estimatedStopPointName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26 pub estimated_stop_point_name: Option<Option<String>>,
27 #[serde(rename = "serviceArrival")]
28 pub service_arrival: Box<models::ServiceTime>,
29 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
30 pub status: Option<Box<models::StopCallStatus>>,
31}
32
33impl Alight {
34 pub fn new(stop_place_ref: models::StopPlaceRef, stop_place_name: String, service_arrival: models::ServiceTime) -> Alight {
36 Alight {
37 stop_place_ref: Box::new(stop_place_ref),
38 stop_place_name,
39 planned_stop_point_name: None,
40 estimated_stop_point_name: None,
41 service_arrival: Box::new(service_arrival),
42 status: None,
43 }
44 }
45}
46