osdm-sys 0.1.0-alpha.3

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/)
Documentation
/*
 * UIC 90918-10 - OSDM
 *
 * 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/) 
 *
 * The version of the OpenAPI document: 3.7.0
 * Contact: osdm@uic.org
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// RegionalValidity : One of the elements Zone, ViaStation, TrainLink, Line, or Polygon defining the regional validity 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct RegionalValidity {
    /// order number of the list item 
    #[serde(rename = "seqNb", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub seq_nb: Option<Option<i32>>,
    #[serde(rename = "zone", skip_serializing_if = "Option::is_none")]
    pub zone: Option<Box<models::Zone>>,
    #[serde(rename = "route", skip_serializing_if = "Option::is_none")]
    pub route: Option<Box<models::Route>>,
    #[serde(rename = "trainLink", skip_serializing_if = "Option::is_none")]
    pub train_link: Option<Box<models::TrainLink>>,
    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
    pub line: Option<Box<models::Line>>,
    #[serde(rename = "polygon", skip_serializing_if = "Option::is_none")]
    pub polygon: Option<Box<models::Polygon>>,
    #[serde(rename = "serviceConstraint", skip_serializing_if = "Option::is_none")]
    pub service_constraint: Option<Box<models::ServiceConstraint>>,
}

impl RegionalValidity {
    /// One of the elements Zone, ViaStation, TrainLink, Line, or Polygon defining the regional validity 
    pub fn new() -> RegionalValidity {
        RegionalValidity {
            seq_nb: None,
            zone: None,
            route: None,
            train_link: None,
            line: None,
            polygon: None,
            service_constraint: None,
        }
    }
}