use std::collections::HashMap; use serde::Deserialize; use crate::version::DownloadInfo; #[derive(Debug, Deserialize)] pub struct Availability { pub group: u32, // unknown meaning pub progress: u32 // unknown meaning } #[derive(Debug, Deserialize)] pub struct Version { pub name: String, pub version: String } #[derive(Debug, Deserialize)] pub struct JavaRuntimeInfo { // I don't see how half of this information is useful with how the JRE system currently functions -figboot pub availability: Availability, pub manifest: DownloadInfo, //pub version: Version } pub type JavaRuntimesManifest = HashMap>>; #[derive(Debug, Deserialize)] pub struct FileDownloads { lzma: Option, raw: DownloadInfo } #[derive(Debug, Deserialize)] #[serde(rename_all = "lowercase", tag = "type")] pub enum JavaRuntimeFile { File { #[serde(default)] executable: bool, downloads: FileDownloads }, Directory, Link { target: String } } #[derive(Debug, Deserialize)] pub struct JavaRuntimeManifest { pub files: HashMap }