tba_openapi_rust/models/
team_event_status_playoff.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct TeamEventStatusPlayoff {
17 #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
19 pub level: Option<Level>,
20 #[serde(rename = "current_level_record", skip_serializing_if = "Option::is_none")]
21 pub current_level_record: Option<Box<crate::models::WltRecord>>,
22 #[serde(rename = "record", skip_serializing_if = "Option::is_none")]
23 pub record: Option<Box<crate::models::WltRecord>>,
24 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
26 pub status: Option<Status>,
27 #[serde(rename = "playoff_average", skip_serializing_if = "Option::is_none")]
29 pub playoff_average: Option<i32>,
30}
31
32impl TeamEventStatusPlayoff {
33 pub fn new() -> TeamEventStatusPlayoff {
35 TeamEventStatusPlayoff {
36 level: None,
37 current_level_record: None,
38 record: None,
39 status: None,
40 playoff_average: None,
41 }
42 }
43}
44
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Level {
48 #[serde(rename = "qm")]
49 Qm,
50 #[serde(rename = "ef")]
51 Ef,
52 #[serde(rename = "qf")]
53 Qf,
54 #[serde(rename = "sf")]
55 Sf,
56 #[serde(rename = "f")]
57 F,
58}
59
60impl Default for Level {
61 fn default() -> Level {
62 Self::Qm
63 }
64}
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
67pub enum Status {
68 #[serde(rename = "won")]
69 Won,
70 #[serde(rename = "eliminated")]
71 Eliminated,
72 #[serde(rename = "playing")]
73 Playing,
74}
75
76impl Default for Status {
77 fn default() -> Status {
78 Self::Won
79 }
80}
81