warframe/worldstate/models/
orb_vallis.rs

1use warframe_macros::model;
2
3/// Represents the state on Orb Vallis
4#[model]
5#[serde(rename_all = "lowercase")]
6pub enum OrbVallisState {
7    /// Warm
8    Warm,
9    /// Cold
10    Cold,
11}
12
13/// The current cycle of the Orb Vallis warm/cold cycle
14#[model(endpoint = "/vallisCycle", return_style = Object, timed)]
15pub struct OrbVallis {
16    /// Unique identifier for this object/event/thing
17    pub id: String,
18
19    /// The state of the orb vallis (warm/cold)
20    pub state: OrbVallisState,
21}
22
23#[cfg(test)]
24mod test_orb_vallis {
25    use rstest::rstest;
26    use serde_json::from_str;
27
28    use super::OrbVallis;
29    use crate::worldstate::Queryable;
30
31    type R = <OrbVallis as Queryable>::Return;
32
33    #[rstest]
34    fn test(
35        #[files("src/worldstate/models/fixtures/orb_vallis.json")]
36        #[mode = str]
37        orb_vallis_en: &str,
38    ) {
39        from_str::<R>(orb_vallis_en).unwrap();
40    }
41}