osdm_sys/models/
luggage_dimension_enum.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/// LuggageDimensionEnum : Type of the dimension. Combined sizes are the sum of the sizes.  Explanation:  WIDTH_HEIGHT_LENGTH = sum of width, hight and length in cm (= linear equivalent). 
15/// Type of the dimension. Combined sizes are the sum of the sizes.  Explanation:  WIDTH_HEIGHT_LENGTH = sum of width, hight and length in cm (= linear equivalent). 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum LuggageDimensionEnum {
18    #[serde(rename = "HEIGHT")]
19    Height,
20    #[serde(rename = "LENGTH")]
21    Length,
22    #[serde(rename = "WEIGHT")]
23    Weight,
24    #[serde(rename = "WIDTH")]
25    Width,
26    #[serde(rename = "WIDTH_HEIGHT")]
27    WidthHeight,
28    #[serde(rename = "WIDTH_HEIGHT_LENGTH")]
29    WidthHeightLength,
30    #[serde(rename = "VOLUME")]
31    Volume,
32
33}
34
35impl std::fmt::Display for LuggageDimensionEnum {
36    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
37        match self {
38            Self::Height => write!(f, "HEIGHT"),
39            Self::Length => write!(f, "LENGTH"),
40            Self::Weight => write!(f, "WEIGHT"),
41            Self::Width => write!(f, "WIDTH"),
42            Self::WidthHeight => write!(f, "WIDTH_HEIGHT"),
43            Self::WidthHeightLength => write!(f, "WIDTH_HEIGHT_LENGTH"),
44            Self::Volume => write!(f, "VOLUME"),
45        }
46    }
47}
48
49impl Default for LuggageDimensionEnum {
50    fn default() -> LuggageDimensionEnum {
51        Self::Height
52    }
53}
54