osdm_sys/models/
booking_search_request.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct BookingSearchRequest {
16    #[serde(rename = "origin", skip_serializing_if = "Option::is_none")]
17    pub origin: Option<Box<models::PlaceRef>>,
18    #[serde(rename = "destination", skip_serializing_if = "Option::is_none")]
19    pub destination: Option<Box<models::PlaceRef>>,
20    #[serde(rename = "passenger", skip_serializing_if = "Option::is_none")]
21    pub passenger: Option<Box<models::PassengerSearchRequest>>,
22    #[serde(rename = "purchaser", skip_serializing_if = "Option::is_none")]
23    pub purchaser: Option<Box<models::PurchaserSearchRequest>>,
24    #[serde(rename = "bookingId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub booking_id: Option<Option<String>>,
26    /// reference to the booking in the downstream distributor system 
27    #[serde(rename = "bookingCode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub booking_code: Option<Option<String>>,
29    /// reference to the booking in the retailer system
30    #[serde(rename = "externalRef", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub external_ref: Option<Option<String>>,
32    /// reference to the booking in the downstream distributor system 
33    #[serde(rename = "distributorBookingRef", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34    pub distributor_booking_ref: Option<Option<String>>,
35    #[serde(rename = "retailerBookingRef", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub retailer_booking_ref: Option<Option<String>>,
37    #[serde(rename = "fulfillmentId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
38    pub fulfillment_id: Option<Option<String>>,
39    #[serde(rename = "fulfillmentControlNumber", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
40    pub fulfillment_control_number: Option<Option<String>>,
41    #[serde(rename = "travelDateRange", skip_serializing_if = "Option::is_none")]
42    pub travel_date_range: Option<Box<models::DateRange>>,
43    #[serde(rename = "purchaseDateRange", skip_serializing_if = "Option::is_none")]
44    pub purchase_date_range: Option<Box<models::DateRange>>,
45    #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
46    pub parameters: Option<Box<models::BookingSearchParameters>>,
47}
48
49impl BookingSearchRequest {
50    pub fn new() -> BookingSearchRequest {
51        BookingSearchRequest {
52            origin: None,
53            destination: None,
54            passenger: None,
55            purchaser: None,
56            booking_id: None,
57            booking_code: None,
58            external_ref: None,
59            distributor_booking_ref: None,
60            retailer_booking_ref: None,
61            fulfillment_id: None,
62            fulfillment_control_number: None,
63            travel_date_range: None,
64            purchase_date_range: None,
65            parameters: None,
66        }
67    }
68}
69