conduit_cli/core/api/mojang/
models.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize)]
4pub struct VersionManifest {
5 pub latest: LatestVersions,
6 pub versions: Vec<VersionEntry>,
7}
8
9#[derive(Debug, Serialize, Deserialize)]
10pub struct LatestVersions {
11 pub release: String,
12 pub snapshot: String,
13}
14
15#[derive(Debug, Serialize, Deserialize)]
16#[serde(rename_all = "camelCase")]
17pub struct VersionEntry {
18 pub id: String,
19 pub r#type: String,
20 pub url: String,
21 pub time: String,
22 pub release_time: String,
23 pub sha1: String,
24 pub compliance_level: u32,
25}
26
27#[derive(Debug, Serialize, Deserialize)]
28pub struct VersionDetails {
29 pub id: String,
30 pub r#type: String,
31 pub downloads: Downloads,
32}
33
34#[derive(Debug, Serialize, Deserialize)]
35#[serde(rename_all = "snake_case")]
36pub struct Downloads {
37 pub client: Option<DownloadArtifact>,
38 pub server: Option<DownloadArtifact>,
39 pub server_mappings: Option<DownloadArtifact>,
40 pub client_mappings: Option<DownloadArtifact>,
41}
42
43#[derive(Debug, Serialize, Deserialize)]
44pub struct DownloadArtifact {
45 pub sha1: String,
46 pub size: u64,
47 pub url: String,
48}