use serde::Deserialize; #[derive(Debug, Deserialize)] pub struct GameVersion { pub id: String, pub downloads: Downloads, #[serde(rename = "assetIndex")] pub asset_index: AssetIndex, pub libraries: Vec, #[serde(rename = "mainClass")] pub main_class: String, #[serde(rename = "minecraftArguments")] pub minecraft_arguments: Option, pub arguments: Option, #[serde(rename = "javaVersion")] pub java_version: Option, } #[derive(Debug, Deserialize)] pub struct Downloads { pub client: DownloadArtifact, pub server: Option, } #[derive(Debug, Deserialize, Clone)] pub struct DownloadArtifact { pub sha1: String, pub size: u64, pub url: String, pub path: Option, } #[derive(Debug, Deserialize)] pub struct AssetIndex { pub id: String, pub sha1: String, pub size: u64, pub url: String, #[serde(rename = "totalSize")] pub total_size: u64, } #[derive(Debug, Deserialize)] pub struct Library { pub downloads: Option, pub name: String, } #[derive(Debug, Deserialize)] pub struct LibraryDownloads { pub artifact: Option, pub classifiers: Option, // Complex, simplifying for now } #[derive(Debug, Deserialize)] pub struct Arguments { pub game: Option, pub jvm: Option, } #[derive(Debug, Deserialize)] pub struct JavaVersion { pub component: String, #[serde(rename = "majorVersion")] pub major_version: u64, }