osdm_sys/models/
gender.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/// Gender : The gender of the passenger, which is important in the case of night trains. Values from the [Gender Code List](https://osdm.io/spec/catalog-of-code-lists/#Gender) 
15/// The gender of the passenger, which is important in the case of night trains. Values from the [Gender Code List](https://osdm.io/spec/catalog-of-code-lists/#Gender) 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum Gender {
18    #[serde(rename = "MALE")]
19    Male,
20    #[serde(rename = "FEMALE")]
21    Female,
22    #[serde(rename = "X")]
23    X,
24
25}
26
27impl std::fmt::Display for Gender {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::Male => write!(f, "MALE"),
31            Self::Female => write!(f, "FEMALE"),
32            Self::X => write!(f, "X"),
33        }
34    }
35}
36
37impl Default for Gender {
38    fn default() -> Gender {
39        Self::Male
40    }
41}
42