1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
17pub struct Board {
18 #[serde(rename = "stopPlaceRef")]
19 pub stop_place_ref: Box<models::StopPlaceRef>,
20 #[serde(rename = "stopPlaceName")]
21 pub stop_place_name: String,
22 #[serde(rename = "plannedStopPointName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24 pub planned_stop_point_name: Option<Option<String>>,
25 #[serde(rename = "estimatedStopPointName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27 pub estimated_stop_point_name: Option<Option<String>>,
28 #[serde(rename = "serviceDeparture")]
29 pub service_departure: Box<models::ServiceTime>,
30 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
31 pub status: Option<Box<models::StopCallStatus>>,
32}
33
34impl Board {
35 pub fn new(stop_place_ref: models::StopPlaceRef, stop_place_name: String, service_departure: models::ServiceTime) -> Board {
37 Board {
38 stop_place_ref: Box::new(stop_place_ref),
39 stop_place_name,
40 planned_stop_point_name: None,
41 estimated_stop_point_name: None,
42 service_departure: Box::new(service_departure),
43 status: None,
44 }
45 }
46}
47