use serde::{self, Deserialize, Serialize};
pub type r#ParamsIds = Vec<i64>;
#[derive(Serialize, Deserialize, Debug)]
pub struct Params {
#[serde(rename = "ids")]
pub r#ids: Option<r#ParamsIds>,
}
#[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 = "result")]
pub r#result: Option<bool>,
#[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("tool_dataprivacy_confirm_contexts_for_deletion", 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("tool_dataprivacy_confirm_contexts_for_deletion", params)
.await
}