using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace VeloeMinecraftLauncher.Entity.Version;

#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.

public class Arguments
{      
    public List<object> Game { get; set; }
    public List<object> Jvm { get; set; }
}
public class Artifact
{
    public string Path { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}

public class AssetIndex
{
    public string Id { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public int TotalSize { get; set; }
    public string Url { get; set; }
}

public class Classifiers
{
    [JsonPropertyName("natives-linux")]
    public NativesLinux NativesLinux { get; set; }

    [JsonPropertyName("natives-osx")]
    public NativesOsx NativesOsx { get; set; }

    [JsonPropertyName("natives-windows")]
    public NativesWindows NativesWindows { get; set; }

    [JsonPropertyName("natives-windows-32")]
    public NativesWindows NativesWindows32 { get; set; }

    [JsonPropertyName("natives-windows-64")]
    public NativesWindows NativesWindows64 { get; set; }

    //public Sources Sources { get; set; }
    //public Javadoc Javadoc { get; set; }
}

public class Client
{
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
    public string Argument { get; set; }
    //public File File { get; set; }
    public string Type { get; set; }
}

public class Downloads
{
    public Client Client { get; set; }
    //public Server Server { get; set; }
    public Artifact Artifact { get; set; }
    public Classifiers Classifiers { get; set; }
}
/*
public class Extract
{
    public List<string> Exclude { get; set; }
}
*/
/*
public class File
{
    public string Id { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}
*/
/*
public class Javadoc
{
    public string Path { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}
*/
public class JavaVersion
{
    public string Component { get; set; }
    public int? MajorVersion { get; set; }
}

public class Library
{
    public Downloads Downloads { get; set; }
    public string Name { get; set; }
    public string Url { get; set; }
    public List<Rule> Rules { get; set; }
    //public Extract Extract { get; set; }
    public Natives Natives { get; set; }
}
/*
public class Logging
{
    public Client Client { get; set; }
}
*/
public class Natives
{
    public string Linux { get; set; }
    public string Osx { get; set; }
    public string Windows { get; set; }
}

public class NativesLinux
{
    public string Path { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}

public class NativesOsx
{
    public string Path { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}

public class NativesWindows
{
    public string Path { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}

public class Os
{
    public string Name { get; set; }
}

public class Version
{
    public Arguments Arguments { get; set; }
    public AssetIndex AssetIndex { get; set; }
    public string Assets { get; set; }
    public int ComplianceLevel { get; set; }
    public Downloads Downloads { get; set; }
    public string Id { get; set; }
    public JavaVersion JavaVersion { get; set; }
    public List<Library> Libraries { get; set; }
    //public Logging Logging { get; set; }
    public string MainClass { get; set; }
    public string MinecraftArguments { get; set; }
    public int MinimumLauncherVersion { get; set; }
    public string ReleaseTime { get; set; }
    public string Time { get; set; }
    public string Type { get; set; }

    public string InheritsFrom { get; set; }
}

public class Rule
{
    public string Action { get; set; }
    public Os Os { get; set; }
}

//not used for now

/*
public class Server
{
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}
*/
/*
public class Sources
{
    public string Path { get; set; }
    public string Sha1 { get; set; }
    public int Size { get; set; }
    public string Url { get; set; }
}
*/
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.