1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//! Facility structs and data structures

pub mod prelude {
    pub use crate::facility::facilities_maintenance::*;
}

pub mod facilities_maintenance {
    use serde::{Deserialize, Serialize};

    #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
    pub struct FacilityMaintenanceRawResp {
        pub value: Vec<FacilityLink>,
    }

    #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
    #[serde(rename_all = "PascalCase")]
    pub struct FacilityLink {
        pub link: String,
    }

    impl From<FacilityMaintenanceRawResp> for Vec<String> {
        fn from(data: FacilityMaintenanceRawResp) -> Self {
            data.value.into_iter().map(|v| v.link).collect()
        }
    }
}