/*
* MOTIS API
*
* 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).
*
* The version of the OpenAPI document: v5
* Contact: felix@triptix.tech
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AlertEffect : The effect of this problem on the affected entity.
/// The effect of this problem on the affected entity.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AlertEffect {
#[serde(rename = "NO_SERVICE")]
NoService,
#[serde(rename = "REDUCED_SERVICE")]
ReducedService,
#[serde(rename = "SIGNIFICANT_DELAYS")]
SignificantDelays,
#[serde(rename = "DETOUR")]
Detour,
#[serde(rename = "ADDITIONAL_SERVICE")]
AdditionalService,
#[serde(rename = "MODIFIED_SERVICE")]
ModifiedService,
#[serde(rename = "OTHER_EFFECT")]
OtherEffect,
#[serde(rename = "UNKNOWN_EFFECT")]
UnknownEffect,
#[serde(rename = "STOP_MOVED")]
StopMoved,
#[serde(rename = "NO_EFFECT")]
NoEffect,
#[serde(rename = "ACCESSIBILITY_ISSUE")]
AccessibilityIssue,
}
impl std::fmt::Display for AlertEffect {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::NoService => write!(f, "NO_SERVICE"),
Self::ReducedService => write!(f, "REDUCED_SERVICE"),
Self::SignificantDelays => write!(f, "SIGNIFICANT_DELAYS"),
Self::Detour => write!(f, "DETOUR"),
Self::AdditionalService => write!(f, "ADDITIONAL_SERVICE"),
Self::ModifiedService => write!(f, "MODIFIED_SERVICE"),
Self::OtherEffect => write!(f, "OTHER_EFFECT"),
Self::UnknownEffect => write!(f, "UNKNOWN_EFFECT"),
Self::StopMoved => write!(f, "STOP_MOVED"),
Self::NoEffect => write!(f, "NO_EFFECT"),
Self::AccessibilityIssue => write!(f, "ACCESSIBILITY_ISSUE"),
}
}
}
impl Default for AlertEffect {
fn default() -> AlertEffect {
Self::NoService
}
}