Skip to main content

osdm_sys/models/
regional_validity.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/// RegionalValidity : One of the elements Zone, ViaStation, TrainLink, Line, or Polygon defining the regional validity 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
17pub struct RegionalValidity {
18    /// order number of the list item 
19    #[serde(rename = "seqNb", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub seq_nb: Option<Option<i32>>,
21    #[serde(rename = "zone", skip_serializing_if = "Option::is_none")]
22    pub zone: Option<Box<models::Zone>>,
23    #[serde(rename = "route", skip_serializing_if = "Option::is_none")]
24    pub route: Option<Box<models::Route>>,
25    #[serde(rename = "trainLink", skip_serializing_if = "Option::is_none")]
26    pub train_link: Option<Box<models::TrainLink>>,
27    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
28    pub line: Option<Box<models::Line>>,
29    #[serde(rename = "polygon", skip_serializing_if = "Option::is_none")]
30    pub polygon: Option<Box<models::Polygon>>,
31    #[serde(rename = "serviceConstraint", skip_serializing_if = "Option::is_none")]
32    pub service_constraint: Option<Box<models::ServiceConstraint>>,
33}
34
35impl RegionalValidity {
36    /// One of the elements Zone, ViaStation, TrainLink, Line, or Polygon defining the regional validity 
37    pub fn new() -> RegionalValidity {
38        RegionalValidity {
39            seq_nb: None,
40            zone: None,
41            route: None,
42            train_link: None,
43            line: None,
44            polygon: None,
45            service_constraint: None,
46        }
47    }
48}
49