osdm-sys 0.1.0-alpha.2

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

/// ContactDetail : Contact information needed to contact a person. Either an email or a phone number needs to be provided. Note: address and postalAddress are deprecated 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ContactDetail {
    /// A human-readable description of the contact. 
    #[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub summary: Option<Option<String>>,
    /// ISO-639-1 language code 
    #[serde(rename = "preferredLanguage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub preferred_language: Option<Option<String>>,
    #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub email: Option<Option<String>>,
    /// Preferably a mobile phone number, to be contacted in case changes to the booking occur, e.g., in case of delays or interruptions. Format according to E.164 The international public telecommunication numbering plan  
    #[serde(rename = "phoneNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<Option<String>>,
    #[serde(rename = "address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub address: Option<Option<String>>,
    #[serde(rename = "postalAddress", skip_serializing_if = "Option::is_none")]
    pub postal_address: Option<Box<models::PostalAddress>>,
}

impl ContactDetail {
    /// Contact information needed to contact a person. Either an email or a phone number needs to be provided. Note: address and postalAddress are deprecated 
    pub fn new() -> ContactDetail {
        ContactDetail {
            summary: None,
            preferred_language: None,
            email: None,
            phone_number: None,
            address: None,
            postal_address: None,
        }
    }
}