Skip to main content

osdm_sys/models/
continuous_service_pick_up_place.rs

1/*
2 * UIC 90918-10 - OSDM
3 *
4 * 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/) 
5 *
6 * The version of the OpenAPI document: 3.7.0
7 * Contact: osdm@uic.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ContinuousServicePickUpPlace : Pick-up places for on-demand vehicles like taxis, bicycles or scooters 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
17pub struct ContinuousServicePickUpPlace {
18    /// id of the pick-up place
19    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
20    pub id: Option<String>,
21    /// description of the pick-up place
22    #[serde(rename = "description")]
23    pub description: String,
24    /// name of the pick-up place
25    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
26    pub name: Option<String>,
27    /// description on how to access the on-demand vehicle
28    #[serde(rename = "accessDescription", skip_serializing_if = "Option::is_none")]
29    pub access_description: Option<String>,
30    #[serde(rename = "geoPosition")]
31    pub geo_position: Box<models::GeoPosition>,
32    #[serde(rename = "availableVehicles")]
33    pub available_vehicles: Vec<models::ContinuousServiceVehicleAvailability>,
34    /// Duration for which the vehicle can be blocked until the usage starts.
35    #[serde(rename = "preAllocationTimeLimit", skip_serializing_if = "Option::is_none")]
36    pub pre_allocation_time_limit: Option<String>,
37    /// Machine readable indications on how the on-demand process should be handled.
38    #[serde(rename = "processIndication", skip_serializing_if = "Option::is_none")]
39    pub process_indication: Option<Vec<String>>,
40    /// Time until when the vehicle is expected to arrive at the pick-up place (taxi,..) 
41    #[serde(rename = "estimatedVehicleArrivalAtPickUp", skip_serializing_if = "Option::is_none")]
42    pub estimated_vehicle_arrival_at_pick_up: Option<String>,
43    /// Time until when the user of the service is expected to arrive at the pick-up place. 
44    #[serde(rename = "estimatedUserArrivalAtPickUp", skip_serializing_if = "Option::is_none")]
45    pub estimated_user_arrival_at_pick_up: Option<String>,
46}
47
48impl ContinuousServicePickUpPlace {
49    /// Pick-up places for on-demand vehicles like taxis, bicycles or scooters 
50    pub fn new(description: String, geo_position: models::GeoPosition, available_vehicles: Vec<models::ContinuousServiceVehicleAvailability>) -> ContinuousServicePickUpPlace {
51        ContinuousServicePickUpPlace {
52            id: None,
53            description,
54            name: None,
55            access_description: None,
56            geo_position: Box::new(geo_position),
57            available_vehicles,
58            pre_allocation_time_limit: None,
59            process_indication: None,
60            estimated_vehicle_arrival_at_pick_up: None,
61            estimated_user_arrival_at_pick_up: None,
62        }
63    }
64}
65