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

/// DatedJourney : Vehicle journey that runs at a specific date. Provided by OJP. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct DatedJourney {
    /// Reference to an operating day. Provided by OJP. 
    #[serde(rename = "operatingDayRef", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub operating_day_ref: Option<Option<String>>,
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<Box<models::Mode>>,
    #[serde(rename = "productCategory", skip_serializing_if = "Option::is_none")]
    pub product_category: Option<Box<models::ProductCategory>>,
    /// Line name or service description as known to the public, f.e. '512', 'S8' or 'Circle Line' or 'ICE 488'. 
    #[serde(rename = "publishedServiceName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub published_service_name: Option<Option<String>>,
    #[serde(rename = "vehicleNumbers")]
    pub vehicle_numbers: Vec<String>,
    #[serde(rename = "lineNumbers", skip_serializing_if = "Option::is_none")]
    pub line_numbers: Option<Vec<String>>,
    #[serde(rename = "serviceStatus", skip_serializing_if = "Option::is_none")]
    pub service_status: Option<Box<models::ServiceStatus>>,
    #[serde(rename = "situationFullRefs", skip_serializing_if = "Option::is_none")]
    pub situation_full_refs: Option<Vec<String>>,
    #[serde(rename = "carriers")]
    pub carriers: Vec<models::NamedCompany>,
    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
    pub attributes: Option<Vec<models::GeneralAttribute>>,
}

impl DatedJourney {
    /// Vehicle journey that runs at a specific date. Provided by OJP. 
    pub fn new(vehicle_numbers: Vec<String>, carriers: Vec<models::NamedCompany>) -> DatedJourney {
        DatedJourney {
            operating_day_ref: None,
            mode: None,
            product_category: None,
            published_service_name: None,
            vehicle_numbers,
            line_numbers: None,
            service_status: None,
            situation_full_refs: None,
            carriers,
            attributes: None,
        }
    }
}