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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct PostalAddress {
    /// Country of the address. 
    #[serde(rename = "countryName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub country_name: Option<Option<String>>,
    /// ISO 3166-1 alpha-2 2 character country code 
    #[serde(rename = "countryCode", skip_serializing_if = "Option::is_none")]
    pub country_code: Option<String>,
    /// Postal code of the address. 
    #[serde(rename = "postCode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub post_code: Option<Option<String>>,
    /// City name 
    #[serde(rename = "city", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub city: Option<Option<String>>,
    /// Street name of the address. Can also contain the house number. 
    #[serde(rename = "street", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub street: Option<Option<String>>,
    /// House number of the address. House number can either be in this separate field, or can be contained in the street field. 
    #[serde(rename = "houseNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub house_number: Option<Option<String>>,
}

impl PostalAddress {
    pub fn new() -> PostalAddress {
        PostalAddress {
            country_name: None,
            country_code: None,
            post_code: None,
            city: None,
            street: None,
            house_number: None,
        }
    }
}