use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Manifest {
pub minecraft: Minecraft,
pub manifest_type: ManifestType,
pub manifest_version: i32,
pub name: String,
pub version: String,
pub author: String,
pub files: Vec<ModpackFile>,
pub overrides: String,
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Minecraft {
pub version: String,
pub mod_loaders: Vec<ModpackModLoader>,
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub enum ManifestType {
MinecraftModpack,
}
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct ModpackFile {
#[serde(rename = "projectID")]
pub project_id: i32,
#[serde(rename = "fileID")]
pub file_id: i32,
pub required: bool,
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ModpackModLoader {
pub id: String,
pub primary: bool,
}