datafusion_odata/
service.rs1#[derive(Debug, serde::Serialize)]
9pub struct Service {
10    pub workspace: Workspace,
11    #[serde(rename = "@xml:base")]
12    pub base_url: String,
13    #[serde(rename = "@xmlns")]
14    pub ns: String,
15    #[serde(rename = "@xmlns:atom")]
16    pub ns_atom: String,
17}
18
19impl Service {
20    pub fn new(base_url: String, workspace: Workspace) -> Self {
21        Self {
22            workspace,
23            base_url,
24            ns: "http://www.w3.org/2007/app".to_string(),
25            ns_atom: "http://www.w3.org/2005/Atom".to_string(),
26        }
27    }
28}
29
30#[derive(Debug, serde::Serialize)]
31pub struct Workspace {
32    #[serde(rename = "atom:title")]
33    pub title: String,
34    #[serde(rename = "collection")]
35    pub collections: Vec<Collection>,
36}
37
38#[derive(Debug, serde::Serialize)]
39pub struct Collection {
40    #[serde(rename = "@href")]
41    pub href: String,
42    #[serde(rename = "atom:title")]
43    pub title: String,
44}