osdm_sys/models/
trip_collection_response.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/// TripCollectionResponse : Trip response structure. Provided by OJP. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TripCollectionResponse {
17    #[serde(rename = "warning", skip_serializing_if = "Option::is_none")]
18    pub warning: Option<Box<models::WarningCollection>>,
19    #[serde(rename = "problems", skip_serializing_if = "Option::is_none")]
20    pub problems: Option<Vec<models::Problem>>,
21    #[serde(rename = "id")]
22    pub id: String,
23    #[serde(rename = "trips", skip_serializing_if = "Option::is_none")]
24    pub trips: Option<Vec<models::Trip>>,
25    #[serde(rename = "tripSummaries", skip_serializing_if = "Option::is_none")]
26    pub trip_summaries: Option<Vec<models::TripSummary>>,
27    ///  Java Property Name: 'links' 
28    #[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
29    pub _links: Option<Vec<models::Link>>,
30}
31
32impl TripCollectionResponse {
33    /// Trip response structure. Provided by OJP. 
34    pub fn new(id: String) -> TripCollectionResponse {
35        TripCollectionResponse {
36            warning: None,
37            problems: None,
38            id,
39            trips: None,
40            trip_summaries: None,
41            _links: None,
42        }
43    }
44}
45