osdm_sys/models/place_usage.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/// PlaceUsage : Provided by OJP.
15/// Provided by OJP.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum PlaceUsage {
18 #[serde(rename = "ORIGIN")]
19 Origin,
20 #[serde(rename = "VIA")]
21 Via,
22 #[serde(rename = "DESTINATION")]
23 Destination,
24
25}
26
27impl std::fmt::Display for PlaceUsage {
28 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29 match self {
30 Self::Origin => write!(f, "ORIGIN"),
31 Self::Via => write!(f, "VIA"),
32 Self::Destination => write!(f, "DESTINATION"),
33 }
34 }
35}
36
37impl Default for PlaceUsage {
38 fn default() -> PlaceUsage {
39 Self::Origin
40 }
41}
42