osdm_sys/models/
route_item.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/// RouteItem : Items to compose routes (Note - replaced viaStation, content compliant with viaStation in IRS 90918-4 and 90918-9) 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RouteItem {
17    /// list of alternative route parts to be used on this travel path referenced by the index in the provided list of route items 
18    #[serde(rename = "alternativeRouteItemIndices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub alternative_route_item_indices: Option<Option<Vec<i32>>>,
20    #[serde(rename = "carrierConstraint", skip_serializing_if = "Option::is_none")]
21    pub carrier_constraint: Option<Box<models::CarrierConstraint>>,
22    /// sequence of route items along the travel path referenced by the index in the provided list of route items 
23    #[serde(rename = "routeItemIndices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub route_item_indices: Option<Option<Vec<i32>>>,
25    #[serde(rename = "serviceConstraint", skip_serializing_if = "Option::is_none")]
26    pub service_constraint: Option<Box<models::ServiceConstraint>>,
27    #[serde(rename = "station", skip_serializing_if = "Option::is_none")]
28    pub station: Option<Box<models::StopPlace>>,
29    #[serde(rename = "fareReferenceStation", skip_serializing_if = "Option::is_none")]
30    pub fare_reference_station: Option<Box<models::FareReferenceStation>>,
31}
32
33impl RouteItem {
34    /// Items to compose routes (Note - replaced viaStation, content compliant with viaStation in IRS 90918-4 and 90918-9) 
35    pub fn new() -> RouteItem {
36        RouteItem {
37            alternative_route_item_indices: None,
38            carrier_constraint: None,
39            route_item_indices: None,
40            service_constraint: None,
41            station: None,
42            fare_reference_station: None,
43        }
44    }
45}
46