osdm_sys/models/
place_allocation.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/// PlaceAllocation : Describes the details of the reserved place(s). 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PlaceAllocation {
17    /// Accommodation type definition out of the  [Accommodation Type Code List](https://osdm.io/spec/catalog-of-code-lists/#AccomodationType) Listed values here are examples. 
18    #[serde(rename = "accommodationType")]
19    pub accommodation_type: String,
20    /// Accommodation sub type definition out of the  [Accommodation Sub Type Code List](https://osdm.io/spec/catalog-of-code-lists/#PlaceProperty) Listed values here are examples. 
21    #[serde(rename = "accommodationSubType")]
22    pub accommodation_sub_type: String,
23    /// Reserved places in a confirmed reservation. Multiple place packs are needed to combined person and bicycle reservations 
24    #[serde(rename = "reservedPlaces")]
25    pub reserved_places: Vec<models::ReservedPlace>,
26    #[serde(rename = "tripLegCoverage")]
27    pub trip_leg_coverage: Box<models::TripLegCoverage>,
28}
29
30impl PlaceAllocation {
31    /// Describes the details of the reserved place(s). 
32    pub fn new(accommodation_type: String, accommodation_sub_type: String, reserved_places: Vec<models::ReservedPlace>, trip_leg_coverage: models::TripLegCoverage) -> PlaceAllocation {
33        PlaceAllocation {
34            accommodation_type,
35            accommodation_sub_type,
36            reserved_places,
37            trip_leg_coverage: Box::new(trip_leg_coverage),
38        }
39    }
40}
41