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

/// ContinuousServicePickUpPlace : Pick-up places for on-demand vehicles like taxis, bicycles or scooters 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ContinuousServicePickUpPlace {
    /// id of the pick-up place
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// description of the pick-up place
    #[serde(rename = "description")]
    pub description: String,
    /// name of the pick-up place
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// description on how to access the on-demand vehicle
    #[serde(rename = "accessDescription", skip_serializing_if = "Option::is_none")]
    pub access_description: Option<String>,
    #[serde(rename = "geoPosition")]
    pub geo_position: Box<models::GeoPosition>,
    #[serde(rename = "availableVehicles")]
    pub available_vehicles: Vec<models::ContinuousServiceVehicleAvailability>,
    /// Duration for which the vehicle can be blocked until the usage starts.
    #[serde(rename = "preAllocationTimeLimit", skip_serializing_if = "Option::is_none")]
    pub pre_allocation_time_limit: Option<String>,
    /// Machine readable indications on how the on-demand process should be handled.
    #[serde(rename = "processIndication", skip_serializing_if = "Option::is_none")]
    pub process_indication: Option<Vec<String>>,
    /// Time until when the vehicle is expected to arrive at the pick-up place (taxi,..) 
    #[serde(rename = "estimatedVehicleArrivalAtPickUp", skip_serializing_if = "Option::is_none")]
    pub estimated_vehicle_arrival_at_pick_up: Option<String>,
    /// Time until when the user of the service is expected to arrive at the pick-up place. 
    #[serde(rename = "estimatedUserArrivalAtPickUp", skip_serializing_if = "Option::is_none")]
    pub estimated_user_arrival_at_pick_up: Option<String>,
}

impl ContinuousServicePickUpPlace {
    /// Pick-up places for on-demand vehicles like taxis, bicycles or scooters 
    pub fn new(description: String, geo_position: models::GeoPosition, available_vehicles: Vec<models::ContinuousServiceVehicleAvailability>) -> ContinuousServicePickUpPlace {
        ContinuousServicePickUpPlace {
            id: None,
            description,
            name: None,
            access_description: None,
            geo_position: Box::new(geo_position),
            available_vehicles,
            pre_allocation_time_limit: None,
            process_indication: None,
            estimated_vehicle_arrival_at_pick_up: None,
            estimated_user_arrival_at_pick_up: None,
        }
    }
}