use serde::{self, Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
pub struct ParamsCopiesItem {
#[serde(rename = "backupid")]
pub r#backupid: Option<String>,
#[serde(rename = "restoreid")]
pub r#restoreid: Option<String>,
#[serde(rename = "operation")]
pub r#operation: Option<String>,
}
pub type r#ParamsCopies = Vec<ParamsCopiesItem>;
#[derive(Serialize, Deserialize, Debug)]
pub struct Params {
#[serde(rename = "copies")]
pub r#copies: Option<r#ParamsCopies>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ReturnsItem {
#[serde(rename = "status")]
pub r#status: Option<i64>,
#[serde(rename = "progress")]
pub r#progress: Option<f64>,
#[serde(rename = "backupid")]
pub r#backupid: Option<String>,
#[serde(rename = "operation")]
pub r#operation: Option<String>,
}
pub type r#Returns = Vec<ReturnsItem>;
pub async fn call<'a>(
client: &'a mut moodle_client::MoodleClient,
params: &'a mut Params,
) -> anyhow::Result<Returns> {
let json = client.post("core_backup_get_copy_progress", 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("core_backup_get_copy_progress", params).await
}