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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ClaimedLeg {
    #[serde(rename = "trainNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub train_number: Option<Option<String>>,
    /// connection missed due to a delay on the previous leg 
    #[serde(rename = "connectionMissed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub connection_missed: Option<Option<bool>>,
    #[serde(rename = "serviceDegradation", skip_serializing_if = "Option::is_none")]
    pub service_degradation: Option<Vec<String>>,
    #[serde(rename = "departureStation", skip_serializing_if = "Option::is_none")]
    pub departure_station: Option<Box<models::Place>>,
    #[serde(rename = "arrivalStation", skip_serializing_if = "Option::is_none")]
    pub arrival_station: Option<Box<models::Place>>,
    #[serde(rename = "plannedDepartureTime", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub planned_departure_time: Option<Option<String>>,
    #[serde(rename = "timetabledArrivalTime", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub timetabled_arrival_time: Option<Option<String>>,
    #[serde(rename = "observedArrivalTime", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub observed_arrival_time: Option<Option<String>>,
}

impl ClaimedLeg {
    pub fn new() -> ClaimedLeg {
        ClaimedLeg {
            train_number: None,
            connection_missed: None,
            service_degradation: None,
            departure_station: None,
            arrival_station: None,
            planned_departure_time: None,
            timetabled_arrival_time: None,
            observed_arrival_time: None,
        }
    }
}