osdm_sys/models/event_detail.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 EventDetail {
16 /// human readable description of the event
17 #[serde(rename = "summary")]
18 pub summary: String,
19 /// Contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred.
20 #[serde(rename = "requestor")]
21 pub requestor: String,
22 #[serde(rename = "change")]
23 pub change: models::HistoryStatus,
24 #[serde(rename = "resource")]
25 pub resource: Box<models::Resource>,
26}
27
28impl EventDetail {
29 pub fn new(summary: String, requestor: String, change: models::HistoryStatus, resource: models::Resource) -> EventDetail {
30 EventDetail {
31 summary,
32 requestor,
33 change,
34 resource: Box::new(resource),
35 }
36 }
37}
38