osdm_sys/models/
trip_parameters.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/// TripParameters : Options to control the search behavior and response contents. number of results > either number of results or number of results before and after are used. Provided by OJP. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TripParameters {
17    #[serde(rename = "dataFilter", skip_serializing_if = "Option::is_none")]
18    pub data_filter: Option<Box<models::TripDataFilter>>,
19    #[serde(rename = "policyFilter", skip_serializing_if = "Option::is_none")]
20    pub policy_filter: Option<Box<models::BaseTripPolicyFilter>>,
21    #[serde(rename = "mobilityFilter", skip_serializing_if = "Option::is_none")]
22    pub mobility_filter: Option<Box<models::TripMobilityFilter>>,
23    /// Deprecated in 3.7.0 as it is getting removed in OJP to avoid inconsistency. 
24    #[serde(rename = "numberOfResults", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub number_of_results: Option<Option<i32>>,
26    #[serde(rename = "numberOfResultsBefore", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub number_of_results_before: Option<Option<i32>>,
28    #[serde(rename = "numberOfResultsAfter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub number_of_results_after: Option<Option<i32>>,
30    #[serde(rename = "ignoreRealtimeData", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub ignore_realtime_data: Option<Option<bool>>,
32    /// The maximum number of interchanges the user will accept per trip. 
33    #[serde(rename = "transferLimit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34    pub transfer_limit: Option<Option<i32>>,
35    /// Modes which an individual powers themselves (such as walk, cycle). Provided by OJP. 
36    #[serde(rename = "itModesToCover", skip_serializing_if = "Option::is_none")]
37    pub it_modes_to_cover: Option<String>,
38}
39
40impl TripParameters {
41    /// Options to control the search behavior and response contents. number of results > either number of results or number of results before and after are used. Provided by OJP. 
42    pub fn new() -> TripParameters {
43        TripParameters {
44            data_filter: None,
45            policy_filter: None,
46            mobility_filter: None,
47            number_of_results: None,
48            number_of_results_before: None,
49            number_of_results_after: None,
50            ignore_realtime_data: None,
51            transfer_limit: None,
52            it_modes_to_cover: None,
53        }
54    }
55}
56