Skip to main content

osdm_sys/models/
booking_response_content.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/// BookingResponseContent : Influences whether referenced resources are returned in full or as references only. 
15/// Influences whether referenced resources are returned in full or as references only. 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
18pub enum BookingResponseContent {
19    #[serde(rename = "ALL")]
20    All,
21    #[serde(rename = "BOOKING")]
22    Booking,
23    #[serde(rename = "BOOKING_PASSENGERS")]
24    BookingPassengers,
25    #[serde(rename = "BOOKING_PURCHASER")]
26    BookingPurchaser,
27    #[serde(rename = "BOOKING_TRIPS")]
28    BookingTrips,
29    #[serde(rename = "BOOKING_BOOKEDOFFERS")]
30    BookingBookedoffers,
31    #[serde(rename = "BOOKING_FULFILLMENTS")]
32    BookingFulfillments,
33    #[serde(rename = "BOOKING_DOCUMENTS")]
34    BookingDocuments,
35    #[serde(rename = "BOOKING_REFUNDOFFERS")]
36    BookingRefundoffers,
37    #[serde(rename = "BOOKING_RELEASEOFFERS")]
38    BookingReleaseoffers,
39    #[serde(rename = "BOOKING_CANCELFULFILLMENTSOFFER")]
40    BookingCancelfulfillmentsoffer,
41    #[serde(rename = "BOOKING_EXCHANGEOPERATIONS")]
42    BookingExchangeoperations,
43    #[serde(rename = "NONE")]
44    None,
45
46}
47
48impl std::fmt::Display for BookingResponseContent {
49    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
50        match self {
51            Self::All => write!(f, "ALL"),
52            Self::Booking => write!(f, "BOOKING"),
53            Self::BookingPassengers => write!(f, "BOOKING_PASSENGERS"),
54            Self::BookingPurchaser => write!(f, "BOOKING_PURCHASER"),
55            Self::BookingTrips => write!(f, "BOOKING_TRIPS"),
56            Self::BookingBookedoffers => write!(f, "BOOKING_BOOKEDOFFERS"),
57            Self::BookingFulfillments => write!(f, "BOOKING_FULFILLMENTS"),
58            Self::BookingDocuments => write!(f, "BOOKING_DOCUMENTS"),
59            Self::BookingRefundoffers => write!(f, "BOOKING_REFUNDOFFERS"),
60            Self::BookingReleaseoffers => write!(f, "BOOKING_RELEASEOFFERS"),
61            Self::BookingCancelfulfillmentsoffer => write!(f, "BOOKING_CANCELFULFILLMENTSOFFER"),
62            Self::BookingExchangeoperations => write!(f, "BOOKING_EXCHANGEOPERATIONS"),
63            Self::None => write!(f, "NONE"),
64        }
65    }
66}
67
68impl Default for BookingResponseContent {
69    fn default() -> BookingResponseContent {
70        Self::All
71    }
72}
73