space_traders/models/
system_type.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The type of waypoint.
8#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
9pub enum SystemType {
10    #[serde(rename = "NEUTRON_STAR")]
11    NeutronStar,
12    #[serde(rename = "RED_STAR")]
13    RedStar,
14    #[serde(rename = "ORANGE_STAR")]
15    OrangeStar,
16    #[serde(rename = "BLUE_STAR")]
17    BlueStar,
18    #[serde(rename = "YOUNG_STAR")]
19    YoungStar,
20    #[serde(rename = "WHITE_DWARF")]
21    WhiteDwarf,
22    #[serde(rename = "BLACK_HOLE")]
23    BlackHole,
24    #[serde(rename = "HYPERGIANT")]
25    Hypergiant,
26    #[serde(rename = "NEBULA")]
27    Nebula,
28    #[serde(rename = "UNSTABLE")]
29    Unstable,
30}
31
32impl ToString for SystemType {
33    fn to_string(&self) -> String {
34        match self {
35            Self::NeutronStar => String::from("NEUTRON_STAR"),
36            Self::RedStar => String::from("RED_STAR"),
37            Self::OrangeStar => String::from("ORANGE_STAR"),
38            Self::BlueStar => String::from("BLUE_STAR"),
39            Self::YoungStar => String::from("YOUNG_STAR"),
40            Self::WhiteDwarf => String::from("WHITE_DWARF"),
41            Self::BlackHole => String::from("BLACK_HOLE"),
42            Self::Hypergiant => String::from("HYPERGIANT"),
43            Self::Nebula => String::from("NEBULA"),
44            Self::Unstable => String::from("UNSTABLE"),
45        }
46    }
47}