osdm_sys/models/
selected_accommodation.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/// SelectedAccommodation : Place selection of places for reservation linked to passengers. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SelectedAccommodation {
17    /// Id of the passenger 
18    #[serde(rename = "passengerRefs")]
19    pub passenger_refs: Vec<String>,
20    /// Accommodation type definition out of the  [Accommodation Type Code List](https://osdm.io/spec/catalog-of-code-lists/#AccomodationType) Listed values here are examples. 
21    #[serde(rename = "accommodationType")]
22    pub accommodation_type: String,
23    /// 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. 
24    #[serde(rename = "accommodationSubType")]
25    pub accommodation_sub_type: String,
26    /// Properties of places as defined in 90810-10. selection from the optional place properties provided in the offer 
27    #[serde(rename = "placeProperties", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub place_properties: Option<Option<Vec<String>>>,
29}
30
31impl SelectedAccommodation {
32    /// Place selection of places for reservation linked to passengers. 
33    pub fn new(passenger_refs: Vec<String>, accommodation_type: String, accommodation_sub_type: String) -> SelectedAccommodation {
34        SelectedAccommodation {
35            passenger_refs,
36            accommodation_type,
37            accommodation_sub_type,
38            place_properties: None,
39        }
40    }
41}
42