osdm_sys/models/
place_param.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/// PlaceParam : More parameters for restricting the request. Provided by OJP. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PlaceParam {
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<models::PlaceType>,
19    #[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
20    pub usage: Option<models::PlaceUsage>,
21    #[serde(rename = "ptModes", skip_serializing_if = "Option::is_none")]
22    pub pt_modes: Option<Box<models::ModeFilter>>,
23    #[serde(rename = "serviceBrandFilter", skip_serializing_if = "Option::is_none")]
24    pub service_brand_filter: Option<Box<models::ServiceBrandFilter>>,
25    #[serde(rename = "carrierFilter", skip_serializing_if = "Option::is_none")]
26    pub carrier_filter: Option<Box<models::CarrierFilter>>,
27    #[serde(rename = "pointOfInterestFilter", skip_serializing_if = "Option::is_none")]
28    pub point_of_interest_filter: Option<Box<models::PointOfInterestFilter>>,
29    /// Maximum number of results to be returned. The service is allowed to return fewer objects if reasonable or otherwise appropriate. 
30    #[serde(rename = "numberOfResults", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub number_of_results: Option<Option<i32>>,
32}
33
34impl PlaceParam {
35    /// More parameters for restricting the request. Provided by OJP. 
36    pub fn new() -> PlaceParam {
37        PlaceParam {
38            r#type: None,
39            usage: None,
40            pt_modes: None,
41            service_brand_filter: None,
42            carrier_filter: None,
43            point_of_interest_filter: None,
44            number_of_results: None,
45        }
46    }
47}
48