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

/// PointOfInterest : A type of place to or through which passengers may wish to navigate as part of their journey and which is modelled in detail by journey planners. Provided by OJP. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct PointOfInterest {
    /// Attribute is used as discriminator for inheritance between data types.
    #[serde(rename = "objectType")]
    pub object_type: String,
    /// id  defining the place. The code is provided as URN, relative URNs are allowed with base path urn:uic:stn '0850000' 
    #[serde(rename = "id")]
    pub id: String,
    /// For a place with ids in different reference systems, the alternative ids can be returned.  The reference system is encoded in the string. E.g.: 'urn:uic:std:80000', 'x_swe:stn:10000', 'ch:1:sloid:343434' 
    #[serde(rename = "alternativeIds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub alternative_ids: Option<Option<Vec<String>>>,
    #[serde(rename = "geoPosition", skip_serializing_if = "Option::is_none")]
    pub geo_position: Option<Box<models::GeoPosition>>,
    #[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<Box<models::PlaceRef>>,
    /// Java Property Name: 'links' 
    #[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
    pub _links: Option<Vec<models::Link>>,
    /// Name or description of point of interest for use in passenger information. 
    #[serde(rename = "name")]
    pub name: String,
    /// id of the Point of Interest. 
    #[serde(rename = "code")]
    pub code: String,
}

impl PointOfInterest {
    /// A type of place to or through which passengers may wish to navigate as part of their journey and which is modelled in detail by journey planners. Provided by OJP. 
    pub fn new(object_type: String, id: String, name: String, code: String) -> PointOfInterest {
        PointOfInterest {
            object_type,
            id,
            alternative_ids: None,
            geo_position: None,
            r#ref: None,
            _links: None,
            name,
            code,
        }
    }
}