use serde::{self, Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
pub struct Params {
#[serde(rename = "bigbluebuttonbnid")]
pub r#bigbluebuttonbnid: Option<i64>,
#[serde(rename = "tools")]
pub r#tools: Option<String>,
#[serde(rename = "groupid")]
pub r#groupid: Option<i64>,
}
pub type r#ReturnsTabledataProfileFeatures = Vec<String>;
#[derive(Serialize, Deserialize, Debug)]
pub struct ReturnsTabledataColumnsItem {
#[serde(rename = "key")]
pub r#key: Option<String>,
#[serde(rename = "label")]
pub r#label: Option<String>,
#[serde(rename = "width")]
pub r#width: Option<String>,
#[serde(rename = "type")]
pub r#type: Option<String>,
#[serde(rename = "sortable")]
pub r#sortable: Option<bool>,
#[serde(rename = "allowHTML")]
pub r#allow_h_t_m_l: Option<bool>,
#[serde(rename = "formatter")]
pub r#formatter: Option<String>,
}
pub type r#ReturnsTabledataColumns = Vec<ReturnsTabledataColumnsItem>;
#[derive(Serialize, Deserialize, Debug)]
pub struct ReturnsTabledata {
#[serde(rename = "activity")]
pub r#activity: Option<String>,
#[serde(rename = "ping_interval")]
pub r#ping_interval: Option<i64>,
#[serde(rename = "locale")]
pub r#locale: Option<String>,
#[serde(rename = "profile_features")]
pub r#profile_features: Option<r#ReturnsTabledataProfileFeatures>,
#[serde(rename = "columns")]
pub r#columns: Option<r#ReturnsTabledataColumns>,
#[serde(rename = "data")]
pub r#data: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ReturnsWarningsItem {
#[serde(rename = "item")]
pub r#item: Option<String>,
#[serde(rename = "itemid")]
pub r#itemid: Option<i64>,
#[serde(rename = "warningcode")]
pub r#warningcode: Option<String>,
#[serde(rename = "message")]
pub r#message: Option<String>,
}
pub type r#ReturnsWarnings = Vec<ReturnsWarningsItem>;
#[derive(Serialize, Deserialize, Debug)]
pub struct Returns {
#[serde(rename = "status")]
pub r#status: Option<bool>,
#[serde(rename = "tabledata")]
pub r#tabledata: Option<ReturnsTabledata>,
#[serde(rename = "warnings")]
pub r#warnings: Option<r#ReturnsWarnings>,
}
pub async fn call<'a>(
client: &'a mut moodle_client::MoodleClient,
params: &'a mut Params,
) -> anyhow::Result<Returns> {
let json = client
.post("mod_bigbluebuttonbn_get_recordings", params)
.await?;
serde_json::from_value(json).map_err(|e| e.into())
}
pub async fn call_raw<'a>(
client: &'a mut moodle_client::MoodleClient,
params: &'a mut Params,
) -> anyhow::Result<serde_json::Value> {
client
.post("mod_bigbluebuttonbn_get_recordings", params)
.await
}