osdm_sys/models/
regulatory_condition.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/// RegulatoryCondition : General conditions applied to cover legal regulations within the area of validity. Allocators must reflect these terms and conditions in the conditions of combined offers and indicate them to the customer where required. Which indications are mandatory to be shown to the customer is defined in the SCICs.  Valid Values: - CIV: terms and conditions according to COTIV regulation - MD: terms and conditions according to SMPS regulation - EU_PRR: terms and conditions according to EU-PRR regulation 
15/// General conditions applied to cover legal regulations within the area of validity. Allocators must reflect these terms and conditions in the conditions of combined offers and indicate them to the customer where required. Which indications are mandatory to be shown to the customer is defined in the SCICs.  Valid Values: - CIV: terms and conditions according to COTIV regulation - MD: terms and conditions according to SMPS regulation - EU_PRR: terms and conditions according to EU-PRR regulation 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum RegulatoryCondition {
18    #[serde(rename = "CIV")]
19    Civ,
20    #[serde(rename = "MD")]
21    Md,
22    #[serde(rename = "EU_PRR")]
23    EuPrr,
24
25}
26
27impl std::fmt::Display for RegulatoryCondition {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::Civ => write!(f, "CIV"),
31            Self::Md => write!(f, "MD"),
32            Self::EuPrr => write!(f, "EU_PRR"),
33        }
34    }
35}
36
37impl Default for RegulatoryCondition {
38    fn default() -> RegulatoryCondition {
39        Self::Civ
40    }
41}
42