osdm_sys/models/specific_place_availability.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/// SpecificPlaceAvailability : Availability status of a specific place.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SpecificPlaceAvailability {
17 /// Place number as indicated at the place in the coach.
18 #[serde(rename = "number")]
19 pub number: String,
20 #[serde(rename = "status")]
21 pub status: models::AvailabilityStatus,
22 /// References requested reservation fares/offerParts/bookingParts that allow the selection of the place. This allows clients to link place availabilities with the corresponding reservation fare/offerPart/bookingPart. E.g. link a bicycle hook with a bicycle reservationOfferPart.
23 #[serde(rename = "reservationRefs")]
24 pub reservation_refs: Vec<models::ReservationReference>,
25 #[serde(rename = "selectionFee", skip_serializing_if = "Option::is_none")]
26 pub selection_fee: Option<Box<models::SelectionFee>>,
27}
28
29impl SpecificPlaceAvailability {
30 /// Availability status of a specific place.
31 pub fn new(number: String, status: models::AvailabilityStatus, reservation_refs: Vec<models::ReservationReference>) -> SpecificPlaceAvailability {
32 SpecificPlaceAvailability {
33 number,
34 status,
35 reservation_refs,
36 selection_fee: None,
37 }
38 }
39}
40