Skip to main content

motis_openapi_sdk/models/
alert_effect.rs

1/*
2 * MOTIS API
3 *
4 * This is the MOTIS routing API.  Overview of MOTIS API versions:  MOTIS 0.x - deprecated/discontinued  MOTIS 2.x - current, providing:  * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84  * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints  If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). 
5 *
6 * The version of the OpenAPI document: v5
7 * Contact: felix@triptix.tech
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AlertEffect : The effect of this problem on the affected entity.
15/// The effect of this problem on the affected entity.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AlertEffect {
18    #[serde(rename = "NO_SERVICE")]
19    NoService,
20    #[serde(rename = "REDUCED_SERVICE")]
21    ReducedService,
22    #[serde(rename = "SIGNIFICANT_DELAYS")]
23    SignificantDelays,
24    #[serde(rename = "DETOUR")]
25    Detour,
26    #[serde(rename = "ADDITIONAL_SERVICE")]
27    AdditionalService,
28    #[serde(rename = "MODIFIED_SERVICE")]
29    ModifiedService,
30    #[serde(rename = "OTHER_EFFECT")]
31    OtherEffect,
32    #[serde(rename = "UNKNOWN_EFFECT")]
33    UnknownEffect,
34    #[serde(rename = "STOP_MOVED")]
35    StopMoved,
36    #[serde(rename = "NO_EFFECT")]
37    NoEffect,
38    #[serde(rename = "ACCESSIBILITY_ISSUE")]
39    AccessibilityIssue,
40
41}
42
43impl std::fmt::Display for AlertEffect {
44    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
45        match self {
46            Self::NoService => write!(f, "NO_SERVICE"),
47            Self::ReducedService => write!(f, "REDUCED_SERVICE"),
48            Self::SignificantDelays => write!(f, "SIGNIFICANT_DELAYS"),
49            Self::Detour => write!(f, "DETOUR"),
50            Self::AdditionalService => write!(f, "ADDITIONAL_SERVICE"),
51            Self::ModifiedService => write!(f, "MODIFIED_SERVICE"),
52            Self::OtherEffect => write!(f, "OTHER_EFFECT"),
53            Self::UnknownEffect => write!(f, "UNKNOWN_EFFECT"),
54            Self::StopMoved => write!(f, "STOP_MOVED"),
55            Self::NoEffect => write!(f, "NO_EFFECT"),
56            Self::AccessibilityIssue => write!(f, "ACCESSIBILITY_ISSUE"),
57        }
58    }
59}
60
61impl Default for AlertEffect {
62    fn default() -> AlertEffect {
63        Self::NoService
64    }
65}
66