osdm_sys/models/service_status.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/// ServiceStatus : Parameters which describe the current status of a dated vehicle journey. Provided by OJP.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServiceStatus {
17 /// Whether this trip is an additional one that has not been planned.
18 #[serde(rename = "unplanned", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19 pub unplanned: Option<Option<bool>>,
20 /// Whether this trip is cancelled and will not be run.
21 #[serde(rename = "cancelled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub cancelled: Option<Option<bool>>,
23 /// Whether this trip deviates from the planned service pattern.
24 #[serde(rename = "deviation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25 pub deviation: Option<Option<bool>>,
26 /// Passenger load status on vehicle. If omitted, not known. Equivalent to siri:OccupancyEnumeration which describes three values: 'full', 'seatingAvailable' and 'standingAvailable'.
27 #[serde(rename = "occupancy", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28 pub occupancy: Option<Option<String>>,
29}
30
31impl ServiceStatus {
32 /// Parameters which describe the current status of a dated vehicle journey. Provided by OJP.
33 pub fn new() -> ServiceStatus {
34 ServiceStatus {
35 unplanned: None,
36 cancelled: None,
37 deviation: None,
38 occupancy: None,
39 }
40 }
41}
42