Skip to content

EVE SDE Schema

Documentation for third-party developers

shipTreeGroups.jsonl

Schema

  • _key (required): integer
    Range: 4 .. 2113
  • description: object

    • de (required): string
    • en (required): string
    • es (required): string
    • fr (required): string
    • ja (required): string
    • ko (required): string
    • ru (required): string
    • zh (required): string
  • elements: array of object

    • _key (required): integer
      Range: 1 .. 7
    • _value (required): integer
      Range: 11 .. 33
  • icon (required): string

  • iconLarge (required): string
  • iconSmall (required): string
  • iconSmallNPC (required): string
  • name (required): object

    • de (required): string
    • en (required): string
    • es (required): string
    • fr (required): string
    • ja (required): string
    • ko (required): string
    • ru (required): string
    • zh (required): string
  • preReqSkills: array of object

    • _key (required): integer
      Range: 500001 .. 500029
    • skills (required): array of object
      • _key (required): integer
        Range: 3184 .. 93983
      • display (required): boolean
      • level (required): integer
        Range: 1 .. 5

Code snippets

// <auto-generated />
//
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
//
//    using QuickType;
//
//    var shipTreeGroup = ShipTreeGroup.FromJson(jsonString);

namespace QuickType
{
    using System;
    using System.Collections.Generic;

    using System.Globalization;
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;

    public partial class ShipTreeGroup
    {
        [JsonProperty("_key")]
        public long Key { get; set; }

        [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
        public Description Description { get; set; }

        [JsonProperty("elements", NullValueHandling = NullValueHandling.Ignore)]
        public Element[] Elements { get; set; }

        [JsonProperty("icon")]
        [JsonConverter(typeof(CunningMinMaxLengthCheckConverter))]
        public string Icon { get; set; }

        [JsonProperty("iconLarge")]
        [JsonConverter(typeof(MagentaMinMaxLengthCheckConverter))]
        public string IconLarge { get; set; }

        [JsonProperty("iconSmall")]
        [JsonConverter(typeof(FriskyMinMaxLengthCheckConverter))]
        public string IconSmall { get; set; }

        [JsonProperty("iconSmallNPC")]
        [JsonConverter(typeof(MischievousMinMaxLengthCheckConverter))]
        public string IconSmallNpc { get; set; }

        [JsonProperty("name")]
        public Name Name { get; set; }

        [JsonProperty("preReqSkills", NullValueHandling = NullValueHandling.Ignore)]
        public PreReqSkill[] PreReqSkills { get; set; }
    }

    public partial class Description
    {
        [JsonProperty("de")]
        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
        public string De { get; set; }

        [JsonProperty("en")]
        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
        public string En { get; set; }

        [JsonProperty("es")]
        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
        public string Es { get; set; }

        [JsonProperty("fr")]
        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
        public string Fr { get; set; }

        [JsonProperty("ja")]
        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
        public string Ja { get; set; }

        [JsonProperty("ko")]
        [JsonConverter(typeof(IndecentMinMaxLengthCheckConverter))]
        public string Ko { get; set; }

        [JsonProperty("ru")]
        [JsonConverter(typeof(HilariousMinMaxLengthCheckConverter))]
        public string Ru { get; set; }

        [JsonProperty("zh")]
        [JsonConverter(typeof(AmbitiousMinMaxLengthCheckConverter))]
        public string Zh { get; set; }
    }

    public partial class Element
    {
        [JsonProperty("_key")]
        public long Key { get; set; }

        [JsonProperty("_value")]
        public long Value { get; set; }
    }

    public partial class Name
    {
        [JsonProperty("de")]
        [JsonConverter(typeof(BraggadociousMinMaxLengthCheckConverter))]
        public string De { get; set; }

        [JsonProperty("en")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter1))]
        public string En { get; set; }

        [JsonProperty("es")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter2))]
        public string Es { get; set; }

        [JsonProperty("fr")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter3))]
        public string Fr { get; set; }

        [JsonProperty("ja")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter4))]
        public string Ja { get; set; }

        [JsonProperty("ko")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter5))]
        public string Ko { get; set; }

        [JsonProperty("ru")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter6))]
        public string Ru { get; set; }

        [JsonProperty("zh")]
        [JsonConverter(typeof(MinMaxLengthCheckConverter7))]
        public string Zh { get; set; }
    }

    public partial class PreReqSkill
    {
        [JsonProperty("_key")]
        public long Key { get; set; }

        [JsonProperty("skills")]
        public Skill[] Skills { get; set; }
    }

    public partial class Skill
    {
        [JsonProperty("_key")]
        public long Key { get; set; }

        [JsonProperty("display")]
        public bool Display { get; set; }

        [JsonProperty("level")]
        public long Level { get; set; }
    }

    public partial class ShipTreeGroup
    {
        public static ShipTreeGroup FromJson(string json) => JsonConvert.DeserializeObject<ShipTreeGroup>(json, QuickType.Converter.Settings);
    }

    public static class Serialize
    {
        public static string ToJson(this ShipTreeGroup self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
    }

    internal static class Converter
    {
        public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
        {
            MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
            DateParseHandling = DateParseHandling.None,
            Converters =
            {
                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
            },
        };
    }

    internal class PurpleMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 52 && value.Length <= 211)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 52 && value.Length <= 211)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
    }

    internal class FluffyMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 64 && value.Length <= 180)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 64 && value.Length <= 180)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
    }

    internal class TentacledMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 73 && value.Length <= 209)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 73 && value.Length <= 209)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
    }

    internal class StickyMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 62 && value.Length <= 272)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 62 && value.Length <= 272)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
    }

    internal class IndigoMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 18 && value.Length <= 77)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 18 && value.Length <= 77)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
    }

    internal class IndecentMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 21 && value.Length <= 73)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 21 && value.Length <= 73)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly IndecentMinMaxLengthCheckConverter Singleton = new IndecentMinMaxLengthCheckConverter();
    }

    internal class HilariousMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 60 && value.Length <= 226)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 60 && value.Length <= 226)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly HilariousMinMaxLengthCheckConverter Singleton = new HilariousMinMaxLengthCheckConverter();
    }

    internal class AmbitiousMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 16 && value.Length <= 57)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 16 && value.Length <= 57)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly AmbitiousMinMaxLengthCheckConverter Singleton = new AmbitiousMinMaxLengthCheckConverter();
    }

    internal class CunningMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 53 && value.Length <= 65)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 53 && value.Length <= 65)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly CunningMinMaxLengthCheckConverter Singleton = new CunningMinMaxLengthCheckConverter();
    }

    internal class MagentaMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 56 && value.Length <= 68)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 56 && value.Length <= 68)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MagentaMinMaxLengthCheckConverter Singleton = new MagentaMinMaxLengthCheckConverter();
    }

    internal class FriskyMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 44 && value.Length <= 56)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 44 && value.Length <= 56)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly FriskyMinMaxLengthCheckConverter Singleton = new FriskyMinMaxLengthCheckConverter();
    }

    internal class MischievousMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 47 && value.Length <= 59)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 47 && value.Length <= 59)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MischievousMinMaxLengthCheckConverter Singleton = new MischievousMinMaxLengthCheckConverter();
    }

    internal class BraggadociousMinMaxLengthCheckConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 6 && value.Length <= 29)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 6 && value.Length <= 29)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly BraggadociousMinMaxLengthCheckConverter Singleton = new BraggadociousMinMaxLengthCheckConverter();
    }

    internal class MinMaxLengthCheckConverter1 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 5 && value.Length <= 26)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 5 && value.Length <= 26)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter1 Singleton = new MinMaxLengthCheckConverter1();
    }

    internal class MinMaxLengthCheckConverter2 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 5 && value.Length <= 31)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 5 && value.Length <= 31)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter2 Singleton = new MinMaxLengthCheckConverter2();
    }

    internal class MinMaxLengthCheckConverter3 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 5 && value.Length <= 41)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 5 && value.Length <= 41)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter3 Singleton = new MinMaxLengthCheckConverter3();
    }

    internal class MinMaxLengthCheckConverter4 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 2 && value.Length <= 14)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 2 && value.Length <= 14)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter4 Singleton = new MinMaxLengthCheckConverter4();
    }

    internal class MinMaxLengthCheckConverter5 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 2 && value.Length <= 13)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 2 && value.Length <= 13)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter5 Singleton = new MinMaxLengthCheckConverter5();
    }

    internal class MinMaxLengthCheckConverter6 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 6 && value.Length <= 40)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 6 && value.Length <= 40)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter6 Singleton = new MinMaxLengthCheckConverter6();
    }

    internal class MinMaxLengthCheckConverter7 : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(string);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            var value = serializer.Deserialize<string>(reader);
            if (value.Length >= 2 && value.Length <= 7)
            {
                return value;
            }
            throw new Exception("Cannot unmarshal type string");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            var value = (string)untypedValue;
            if (value.Length >= 2 && value.Length <= 7)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

        public static readonly MinMaxLengthCheckConverter7 Singleton = new MinMaxLengthCheckConverter7();
    }
}
// Code generated from JSON Schema using quicktype. DO NOT EDIT.
// To parse and unparse this JSON data, add this code to your project and do:
//
//    shipTreeGroup, err := UnmarshalShipTreeGroup(bytes)
//    bytes, err = shipTreeGroup.Marshal()

package model

import "encoding/json"

func UnmarshalShipTreeGroup(data []byte) (ShipTreeGroup, error) {
    var r ShipTreeGroup
    err := json.Unmarshal(data, &r)
    return r, err
}

func (r *ShipTreeGroup) Marshal() ([]byte, error) {
    return json.Marshal(r)
}

type ShipTreeGroup struct {
    Key          int64         `json:"_key"`
    Description  *Description  `json:"description,omitempty"`
    Elements     []Element     `json:"elements,omitempty"`
    Icon         string        `json:"icon"`
    IconLarge    string        `json:"iconLarge"`
    IconSmall    string        `json:"iconSmall"`
    IconSmallNPC string        `json:"iconSmallNPC"`
    Name         Name          `json:"name"`
    PreReqSkills []PreReqSkill `json:"preReqSkills,omitempty"`
}

type Description struct {
    De string `json:"de"`
    En string `json:"en"`
    Es string `json:"es"`
    Fr string `json:"fr"`
    Ja string `json:"ja"`
    Ko string `json:"ko"`
    Ru string `json:"ru"`
    Zh string `json:"zh"`
}

type Element struct {
    Key   int64 `json:"_key"`
    Value int64 `json:"_value"`
}

type Name struct {
    De string `json:"de"`
    En string `json:"en"`
    Es string `json:"es"`
    Fr string `json:"fr"`
    Ja string `json:"ja"`
    Ko string `json:"ko"`
    Ru string `json:"ru"`
    Zh string `json:"zh"`
}

type PreReqSkill struct {
    Key    int64   `json:"_key"`
    Skills []Skill `json:"skills"`
}

type Skill struct {
    Key     int64 `json:"_key"`
    Display bool  `json:"display"`
    Level   int64 `json:"level"`
}
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"_key":{"type":"integer","minimum":4,"maximum":2113},"description":{"type":"object","properties":{"de":{"type":"string","minLength":52,"maxLength":211},"en":{"type":"string","minLength":64,"maxLength":180},"es":{"type":"string","minLength":73,"maxLength":209},"fr":{"type":"string","minLength":62,"maxLength":272},"ja":{"type":"string","minLength":18,"maxLength":77},"ko":{"type":"string","minLength":21,"maxLength":73},"ru":{"type":"string","minLength":60,"maxLength":226},"zh":{"type":"string","minLength":16,"maxLength":57}},"required":["de","en","es","fr","ja","ko","ru","zh"]},"elements":{"type":"array","items":{"type":"object","properties":{"_key":{"type":"integer","minimum":1,"maximum":7},"_value":{"type":"integer","minimum":11,"maximum":33}},"required":["_key","_value"]},"minItems":1,"maxItems":7},"icon":{"type":"string","minLength":53,"maxLength":65},"iconLarge":{"type":"string","minLength":56,"maxLength":68},"iconSmall":{"type":"string","minLength":44,"maxLength":56},"iconSmallNPC":{"type":"string","minLength":47,"maxLength":59},"name":{"type":"object","properties":{"de":{"type":"string","minLength":6,"maxLength":29},"en":{"type":"string","minLength":5,"maxLength":26},"es":{"type":"string","minLength":5,"maxLength":31},"fr":{"type":"string","minLength":5,"maxLength":41},"ja":{"type":"string","minLength":2,"maxLength":14},"ko":{"type":"string","minLength":2,"maxLength":13},"ru":{"type":"string","minLength":6,"maxLength":40},"zh":{"type":"string","minLength":2,"maxLength":7}},"required":["de","en","es","fr","ja","ko","ru","zh"]},"preReqSkills":{"type":"array","items":{"type":"object","properties":{"_key":{"type":"integer","minimum":500001,"maximum":500029},"skills":{"type":"array","items":{"type":"object","properties":{"_key":{"type":"integer","minimum":3184,"maximum":93983},"display":{"type":"boolean"},"level":{"type":"integer","minimum":1,"maximum":5}},"required":["_key","display","level"]},"minItems":1,"maxItems":5}},"required":["_key","skills"]},"minItems":1,"maxItems":14}},"required":["_key","icon","iconLarge","iconSmall","iconSmallNPC","name"]}
// To parse the JSON, install kotlin's serialization plugin and do:
//
// val json          = Json { allowStructuredMapKeys = true }
// val shipTreeGroup = json.parse(ShipTreeGroup.serializer(), jsonString)

package model

import kotlinx.serialization.*
import kotlinx.serialization.json.*
import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.*

@Serializable
data class ShipTreeGroup (
    @SerialName("_key")
    val key: Long,

    val description: Description? = null,
    val elements: List<Element>? = null,
    val icon: String,
    val iconLarge: String,
    val iconSmall: String,

    @SerialName("iconSmallNPC")
    val iconSmallNpc: String,

    val name: Name,
    val preReqSkills: List<PreReqSkill>? = null
)

@Serializable
data class Description (
    val de: String,
    val en: String,
    val es: String,
    val fr: String,
    val ja: String,
    val ko: String,
    val ru: String,
    val zh: String
)

@Serializable
data class Element (
    @SerialName("_key")
    val key: Long,

    @SerialName("_value")
    val value: Long
)

@Serializable
data class Name (
    val de: String,
    val en: String,
    val es: String,
    val fr: String,
    val ja: String,
    val ko: String,
    val ru: String,
    val zh: String
)

@Serializable
data class PreReqSkill (
    @SerialName("_key")
    val key: Long,

    val skills: List<Skill>
)

@Serializable
data class Skill (
    @SerialName("_key")
    val key: Long,

    val display: Boolean,
    val level: Long
)
<?php

// This is a autogenerated file:ShipTreeGroup

class ShipTreeGroup {
    private int $key; // json:_key Required
    private ?Description $description; // json:description Optional
    private ?array $elements; // json:elements Optional
    private string $icon; // json:icon Required
    private string $iconLarge; // json:iconLarge Required
    private string $iconSmall; // json:iconSmall Required
    private string $iconSmallNpc; // json:iconSmallNPC Required
    private Name $name; // json:name Required
    private ?array $preReqSkills; // json:preReqSkills Optional

    /**
     * @param int $key
     * @param Description|null $description
     * @param array|null $elements
     * @param string $icon
     * @param string $iconLarge
     * @param string $iconSmall
     * @param string $iconSmallNpc
     * @param Name $name
     * @param array|null $preReqSkills
     */
    public function __construct(int $key, ?Description $description, ?array $elements, string $icon, string $iconLarge, string $iconSmall, string $iconSmallNpc, Name $name, ?array $preReqSkills) {
        $this->key = $key;
        $this->description = $description;
        $this->elements = $elements;
        $this->icon = $icon;
        $this->iconLarge = $iconLarge;
        $this->iconSmall = $iconSmall;
        $this->iconSmallNpc = $iconSmallNpc;
        $this->name = $name;
        $this->preReqSkills = $preReqSkills;
    }

    /**
     * @param int $value
     * @throws Exception
     * @return int
     */
    public static function fromKey(int $value): int {
        return $value; /*int*/
    }

    /**
     * @throws Exception
     * @return int
     */
    public function toKey(): int {
        if (ShipTreeGroup::validateKey($this->key))  {
            return $this->key; /*int*/
        }
        throw new Exception('never get to this ShipTreeGroup::key');
    }

    /**
     * @param int
     * @return bool
     * @throws Exception
     */
    public static function validateKey(int $value): bool {
        if (!is_integer($value)) {
            throw new Exception("Attribute Error:ShipTreeGroup::key");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return int
     */
    public function getKey(): int {
        if (ShipTreeGroup::validateKey($this->key))  {
            return $this->key;
        }
        throw new Exception('never get to getKey ShipTreeGroup::key');
    }

    /**
     * @return int
     */
    public static function sampleKey(): int {
        return 31; /*31:key*/
    }

    /**
     * @param ?stdClass $value
     * @throws Exception
     * @return ?Description
     */
    public static function fromDescription(?stdClass $value): ?Description {
        if (!is_null($value)) {
            return Description::from($value); /*class*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?stdClass
     */
    public function toDescription(): ?stdClass {
        if (ShipTreeGroup::validateDescription($this->description))  {
            if (!is_null($this->description)) {
                return $this->description->to(); /*class*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ShipTreeGroup::description');
    }

    /**
     * @param Description|null
     * @return bool
     * @throws Exception
     */
    public static function validateDescription(?Description $value): bool {
        if (!is_null($value)) {
            $value->validate();
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?Description
     */
    public function getDescription(): ?Description {
        if (ShipTreeGroup::validateDescription($this->description))  {
            return $this->description;
        }
        throw new Exception('never get to getDescription ShipTreeGroup::description');
    }

    /**
     * @return ?Description
     */
    public static function sampleDescription(): ?Description {
        return Description::sample(); /*32:description*/
    }

    /**
     * @param ?array $value
     * @throws Exception
     * @return ?array
     */
    public static function fromElements(?array $value): ?array {
        if (!is_null($value)) {
            return  array_map(function ($value) {
                return Element::from($value); /*class*/
            }, $value);
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?array
     */
    public function toElements(): ?array {
        if (ShipTreeGroup::validateElements($this->elements))  {
            if (!is_null($this->elements)) {
                return array_map(function ($value) {
                    return $value->to(); /*class*/
                }, $this->elements);
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ShipTreeGroup::elements');
    }

    /**
     * @param array|null
     * @return bool
     * @throws Exception
     */
    public static function validateElements(?array $value): bool {
        if (!is_null($value)) {
            if (!is_array($value)) {
                throw new Exception("Attribute Error:ShipTreeGroup::elements");
            }
            array_walk($value, function($value_v) {
                $value_v->validate();
            });
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?array
     */
    public function getElements(): ?array {
        if (ShipTreeGroup::validateElements($this->elements))  {
            return $this->elements;
        }
        throw new Exception('never get to getElements ShipTreeGroup::elements');
    }

    /**
     * @return ?array
     */
    public static function sampleElements(): ?array {
        return  array(
            Element::sample() /*33:*/
        ); /* 33:elements*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromIcon(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toIcon(): string {
        if (ShipTreeGroup::validateIcon($this->icon))  {
            return $this->icon; /*string*/
        }
        throw new Exception('never get to this ShipTreeGroup::icon');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateIcon(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:ShipTreeGroup::icon");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getIcon(): string {
        if (ShipTreeGroup::validateIcon($this->icon))  {
            return $this->icon;
        }
        throw new Exception('never get to getIcon ShipTreeGroup::icon');
    }

    /**
     * @return string
     */
    public static function sampleIcon(): string {
        return 'ShipTreeGroup::icon::34'; /*34:icon*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromIconLarge(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toIconLarge(): string {
        if (ShipTreeGroup::validateIconLarge($this->iconLarge))  {
            return $this->iconLarge; /*string*/
        }
        throw new Exception('never get to this ShipTreeGroup::iconLarge');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateIconLarge(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:ShipTreeGroup::iconLarge");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getIconLarge(): string {
        if (ShipTreeGroup::validateIconLarge($this->iconLarge))  {
            return $this->iconLarge;
        }
        throw new Exception('never get to getIconLarge ShipTreeGroup::iconLarge');
    }

    /**
     * @return string
     */
    public static function sampleIconLarge(): string {
        return 'ShipTreeGroup::iconLarge::35'; /*35:iconLarge*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromIconSmall(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toIconSmall(): string {
        if (ShipTreeGroup::validateIconSmall($this->iconSmall))  {
            return $this->iconSmall; /*string*/
        }
        throw new Exception('never get to this ShipTreeGroup::iconSmall');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateIconSmall(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:ShipTreeGroup::iconSmall");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getIconSmall(): string {
        if (ShipTreeGroup::validateIconSmall($this->iconSmall))  {
            return $this->iconSmall;
        }
        throw new Exception('never get to getIconSmall ShipTreeGroup::iconSmall');
    }

    /**
     * @return string
     */
    public static function sampleIconSmall(): string {
        return 'ShipTreeGroup::iconSmall::36'; /*36:iconSmall*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromIconSmallNpc(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toIconSmallNpc(): string {
        if (ShipTreeGroup::validateIconSmallNpc($this->iconSmallNpc))  {
            return $this->iconSmallNpc; /*string*/
        }
        throw new Exception('never get to this ShipTreeGroup::iconSmallNpc');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateIconSmallNpc(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:ShipTreeGroup::iconSmallNpc");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getIconSmallNpc(): string {
        if (ShipTreeGroup::validateIconSmallNpc($this->iconSmallNpc))  {
            return $this->iconSmallNpc;
        }
        throw new Exception('never get to getIconSmallNpc ShipTreeGroup::iconSmallNpc');
    }

    /**
     * @return string
     */
    public static function sampleIconSmallNpc(): string {
        return 'ShipTreeGroup::iconSmallNpc::37'; /*37:iconSmallNpc*/
    }

    /**
     * @param stdClass $value
     * @throws Exception
     * @return Name
     */
    public static function fromName(stdClass $value): Name {
        return Name::from($value); /*class*/
    }

    /**
     * @throws Exception
     * @return stdClass
     */
    public function toName(): stdClass {
        if (ShipTreeGroup::validateName($this->name))  {
            return $this->name->to(); /*class*/
        }
        throw new Exception('never get to this ShipTreeGroup::name');
    }

    /**
     * @param Name
     * @return bool
     * @throws Exception
     */
    public static function validateName(Name $value): bool {
        $value->validate();
        return true;
    }

    /**
     * @throws Exception
     * @return Name
     */
    public function getName(): Name {
        if (ShipTreeGroup::validateName($this->name))  {
            return $this->name;
        }
        throw new Exception('never get to getName ShipTreeGroup::name');
    }

    /**
     * @return Name
     */
    public static function sampleName(): Name {
        return Name::sample(); /*38:name*/
    }

    /**
     * @param ?array $value
     * @throws Exception
     * @return ?array
     */
    public static function fromPreReqSkills(?array $value): ?array {
        if (!is_null($value)) {
            return  array_map(function ($value) {
                return PreReqSkill::from($value); /*class*/
            }, $value);
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?array
     */
    public function toPreReqSkills(): ?array {
        if (ShipTreeGroup::validatePreReqSkills($this->preReqSkills))  {
            if (!is_null($this->preReqSkills)) {
                return array_map(function ($value) {
                    return $value->to(); /*class*/
                }, $this->preReqSkills);
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ShipTreeGroup::preReqSkills');
    }

    /**
     * @param array|null
     * @return bool
     * @throws Exception
     */
    public static function validatePreReqSkills(?array $value): bool {
        if (!is_null($value)) {
            if (!is_array($value)) {
                throw new Exception("Attribute Error:ShipTreeGroup::preReqSkills");
            }
            array_walk($value, function($value_v) {
                $value_v->validate();
            });
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?array
     */
    public function getPreReqSkills(): ?array {
        if (ShipTreeGroup::validatePreReqSkills($this->preReqSkills))  {
            return $this->preReqSkills;
        }
        throw new Exception('never get to getPreReqSkills ShipTreeGroup::preReqSkills');
    }

    /**
     * @return ?array
     */
    public static function samplePreReqSkills(): ?array {
        return  array(
            PreReqSkill::sample() /*39:*/
        ); /* 39:preReqSkills*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return ShipTreeGroup::validateKey($this->key)
        || ShipTreeGroup::validateDescription($this->description)
        || ShipTreeGroup::validateElements($this->elements)
        || ShipTreeGroup::validateIcon($this->icon)
        || ShipTreeGroup::validateIconLarge($this->iconLarge)
        || ShipTreeGroup::validateIconSmall($this->iconSmall)
        || ShipTreeGroup::validateIconSmallNpc($this->iconSmallNpc)
        || ShipTreeGroup::validateName($this->name)
        || ShipTreeGroup::validatePreReqSkills($this->preReqSkills);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'_key'} = $this->toKey();
        $out->{'description'} = $this->toDescription();
        $out->{'elements'} = $this->toElements();
        $out->{'icon'} = $this->toIcon();
        $out->{'iconLarge'} = $this->toIconLarge();
        $out->{'iconSmall'} = $this->toIconSmall();
        $out->{'iconSmallNPC'} = $this->toIconSmallNpc();
        $out->{'name'} = $this->toName();
        $out->{'preReqSkills'} = $this->toPreReqSkills();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return ShipTreeGroup
     * @throws Exception
     */
    public static function from(stdClass $obj): ShipTreeGroup {
        return new ShipTreeGroup(
         ShipTreeGroup::fromKey($obj->{'_key'})
        ,ShipTreeGroup::fromDescription($obj->{'description'})
        ,ShipTreeGroup::fromElements($obj->{'elements'})
        ,ShipTreeGroup::fromIcon($obj->{'icon'})
        ,ShipTreeGroup::fromIconLarge($obj->{'iconLarge'})
        ,ShipTreeGroup::fromIconSmall($obj->{'iconSmall'})
        ,ShipTreeGroup::fromIconSmallNpc($obj->{'iconSmallNPC'})
        ,ShipTreeGroup::fromName($obj->{'name'})
        ,ShipTreeGroup::fromPreReqSkills($obj->{'preReqSkills'})
        );
    }

    /**
     * @return ShipTreeGroup
     */
    public static function sample(): ShipTreeGroup {
        return new ShipTreeGroup(
         ShipTreeGroup::sampleKey()
        ,ShipTreeGroup::sampleDescription()
        ,ShipTreeGroup::sampleElements()
        ,ShipTreeGroup::sampleIcon()
        ,ShipTreeGroup::sampleIconLarge()
        ,ShipTreeGroup::sampleIconSmall()
        ,ShipTreeGroup::sampleIconSmallNpc()
        ,ShipTreeGroup::sampleName()
        ,ShipTreeGroup::samplePreReqSkills()
        );
    }
}

// This is a autogenerated file:Description

class Description {
    private string $de; // json:de Required
    private string $en; // json:en Required
    private string $es; // json:es Required
    private string $fr; // json:fr Required
    private string $ja; // json:ja Required
    private string $ko; // json:ko Required
    private string $ru; // json:ru Required
    private string $zh; // json:zh Required

    /**
     * @param string $de
     * @param string $en
     * @param string $es
     * @param string $fr
     * @param string $ja
     * @param string $ko
     * @param string $ru
     * @param string $zh
     */
    public function __construct(string $de, string $en, string $es, string $fr, string $ja, string $ko, string $ru, string $zh) {
        $this->de = $de;
        $this->en = $en;
        $this->es = $es;
        $this->fr = $fr;
        $this->ja = $ja;
        $this->ko = $ko;
        $this->ru = $ru;
        $this->zh = $zh;
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromDe(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toDe(): string {
        if (Description::validateDe($this->de))  {
            return $this->de; /*string*/
        }
        throw new Exception('never get to this Description::de');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateDe(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::de");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getDe(): string {
        if (Description::validateDe($this->de))  {
            return $this->de;
        }
        throw new Exception('never get to getDe Description::de');
    }

    /**
     * @return string
     */
    public static function sampleDe(): string {
        return 'Description::de::31'; /*31:de*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromEn(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toEn(): string {
        if (Description::validateEn($this->en))  {
            return $this->en; /*string*/
        }
        throw new Exception('never get to this Description::en');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateEn(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::en");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getEn(): string {
        if (Description::validateEn($this->en))  {
            return $this->en;
        }
        throw new Exception('never get to getEn Description::en');
    }

    /**
     * @return string
     */
    public static function sampleEn(): string {
        return 'Description::en::32'; /*32:en*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromEs(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toEs(): string {
        if (Description::validateEs($this->es))  {
            return $this->es; /*string*/
        }
        throw new Exception('never get to this Description::es');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateEs(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::es");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getEs(): string {
        if (Description::validateEs($this->es))  {
            return $this->es;
        }
        throw new Exception('never get to getEs Description::es');
    }

    /**
     * @return string
     */
    public static function sampleEs(): string {
        return 'Description::es::33'; /*33:es*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromFr(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toFr(): string {
        if (Description::validateFr($this->fr))  {
            return $this->fr; /*string*/
        }
        throw new Exception('never get to this Description::fr');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateFr(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::fr");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getFr(): string {
        if (Description::validateFr($this->fr))  {
            return $this->fr;
        }
        throw new Exception('never get to getFr Description::fr');
    }

    /**
     * @return string
     */
    public static function sampleFr(): string {
        return 'Description::fr::34'; /*34:fr*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromJa(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toJa(): string {
        if (Description::validateJa($this->ja))  {
            return $this->ja; /*string*/
        }
        throw new Exception('never get to this Description::ja');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateJa(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::ja");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getJa(): string {
        if (Description::validateJa($this->ja))  {
            return $this->ja;
        }
        throw new Exception('never get to getJa Description::ja');
    }

    /**
     * @return string
     */
    public static function sampleJa(): string {
        return 'Description::ja::35'; /*35:ja*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromKo(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toKo(): string {
        if (Description::validateKo($this->ko))  {
            return $this->ko; /*string*/
        }
        throw new Exception('never get to this Description::ko');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateKo(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::ko");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getKo(): string {
        if (Description::validateKo($this->ko))  {
            return $this->ko;
        }
        throw new Exception('never get to getKo Description::ko');
    }

    /**
     * @return string
     */
    public static function sampleKo(): string {
        return 'Description::ko::36'; /*36:ko*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromRu(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toRu(): string {
        if (Description::validateRu($this->ru))  {
            return $this->ru; /*string*/
        }
        throw new Exception('never get to this Description::ru');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateRu(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::ru");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getRu(): string {
        if (Description::validateRu($this->ru))  {
            return $this->ru;
        }
        throw new Exception('never get to getRu Description::ru');
    }

    /**
     * @return string
     */
    public static function sampleRu(): string {
        return 'Description::ru::37'; /*37:ru*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromZh(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toZh(): string {
        if (Description::validateZh($this->zh))  {
            return $this->zh; /*string*/
        }
        throw new Exception('never get to this Description::zh');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateZh(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Description::zh");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getZh(): string {
        if (Description::validateZh($this->zh))  {
            return $this->zh;
        }
        throw new Exception('never get to getZh Description::zh');
    }

    /**
     * @return string
     */
    public static function sampleZh(): string {
        return 'Description::zh::38'; /*38:zh*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return Description::validateDe($this->de)
        || Description::validateEn($this->en)
        || Description::validateEs($this->es)
        || Description::validateFr($this->fr)
        || Description::validateJa($this->ja)
        || Description::validateKo($this->ko)
        || Description::validateRu($this->ru)
        || Description::validateZh($this->zh);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'de'} = $this->toDe();
        $out->{'en'} = $this->toEn();
        $out->{'es'} = $this->toEs();
        $out->{'fr'} = $this->toFr();
        $out->{'ja'} = $this->toJa();
        $out->{'ko'} = $this->toKo();
        $out->{'ru'} = $this->toRu();
        $out->{'zh'} = $this->toZh();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return Description
     * @throws Exception
     */
    public static function from(stdClass $obj): Description {
        return new Description(
         Description::fromDe($obj->{'de'})
        ,Description::fromEn($obj->{'en'})
        ,Description::fromEs($obj->{'es'})
        ,Description::fromFr($obj->{'fr'})
        ,Description::fromJa($obj->{'ja'})
        ,Description::fromKo($obj->{'ko'})
        ,Description::fromRu($obj->{'ru'})
        ,Description::fromZh($obj->{'zh'})
        );
    }

    /**
     * @return Description
     */
    public static function sample(): Description {
        return new Description(
         Description::sampleDe()
        ,Description::sampleEn()
        ,Description::sampleEs()
        ,Description::sampleFr()
        ,Description::sampleJa()
        ,Description::sampleKo()
        ,Description::sampleRu()
        ,Description::sampleZh()
        );
    }
}

// This is a autogenerated file:Element

class Element {
    private int $key; // json:_key Required
    private int $value; // json:_value Required

    /**
     * @param int $key
     * @param int $value
     */
    public function __construct(int $key, int $value) {
        $this->key = $key;
        $this->value = $value;
    }

    /**
     * @param int $value
     * @throws Exception
     * @return int
     */
    public static function fromKey(int $value): int {
        return $value; /*int*/
    }

    /**
     * @throws Exception
     * @return int
     */
    public function toKey(): int {
        if (Element::validateKey($this->key))  {
            return $this->key; /*int*/
        }
        throw new Exception('never get to this Element::key');
    }

    /**
     * @param int
     * @return bool
     * @throws Exception
     */
    public static function validateKey(int $value): bool {
        if (!is_integer($value)) {
            throw new Exception("Attribute Error:Element::key");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return int
     */
    public function getKey(): int {
        if (Element::validateKey($this->key))  {
            return $this->key;
        }
        throw new Exception('never get to getKey Element::key');
    }

    /**
     * @return int
     */
    public static function sampleKey(): int {
        return 31; /*31:key*/
    }

    /**
     * @param int $value
     * @throws Exception
     * @return int
     */
    public static function fromValue(int $value): int {
        return $value; /*int*/
    }

    /**
     * @throws Exception
     * @return int
     */
    public function toValue(): int {
        if (Element::validateValue($this->value))  {
            return $this->value; /*int*/
        }
        throw new Exception('never get to this Element::value');
    }

    /**
     * @param int
     * @return bool
     * @throws Exception
     */
    public static function validateValue(int $value): bool {
        if (!is_integer($value)) {
            throw new Exception("Attribute Error:Element::value");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return int
     */
    public function getValue(): int {
        if (Element::validateValue($this->value))  {
            return $this->value;
        }
        throw new Exception('never get to getValue Element::value');
    }

    /**
     * @return int
     */
    public static function sampleValue(): int {
        return 32; /*32:value*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return Element::validateKey($this->key)
        || Element::validateValue($this->value);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'_key'} = $this->toKey();
        $out->{'_value'} = $this->toValue();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return Element
     * @throws Exception
     */
    public static function from(stdClass $obj): Element {
        return new Element(
         Element::fromKey($obj->{'_key'})
        ,Element::fromValue($obj->{'_value'})
        );
    }

    /**
     * @return Element
     */
    public static function sample(): Element {
        return new Element(
         Element::sampleKey()
        ,Element::sampleValue()
        );
    }
}

// This is a autogenerated file:Name

class Name {
    private string $de; // json:de Required
    private string $en; // json:en Required
    private string $es; // json:es Required
    private string $fr; // json:fr Required
    private string $ja; // json:ja Required
    private string $ko; // json:ko Required
    private string $ru; // json:ru Required
    private string $zh; // json:zh Required

    /**
     * @param string $de
     * @param string $en
     * @param string $es
     * @param string $fr
     * @param string $ja
     * @param string $ko
     * @param string $ru
     * @param string $zh
     */
    public function __construct(string $de, string $en, string $es, string $fr, string $ja, string $ko, string $ru, string $zh) {
        $this->de = $de;
        $this->en = $en;
        $this->es = $es;
        $this->fr = $fr;
        $this->ja = $ja;
        $this->ko = $ko;
        $this->ru = $ru;
        $this->zh = $zh;
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromDe(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toDe(): string {
        if (Name::validateDe($this->de))  {
            return $this->de; /*string*/
        }
        throw new Exception('never get to this Name::de');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateDe(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::de");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getDe(): string {
        if (Name::validateDe($this->de))  {
            return $this->de;
        }
        throw new Exception('never get to getDe Name::de');
    }

    /**
     * @return string
     */
    public static function sampleDe(): string {
        return 'Name::de::31'; /*31:de*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromEn(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toEn(): string {
        if (Name::validateEn($this->en))  {
            return $this->en; /*string*/
        }
        throw new Exception('never get to this Name::en');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateEn(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::en");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getEn(): string {
        if (Name::validateEn($this->en))  {
            return $this->en;
        }
        throw new Exception('never get to getEn Name::en');
    }

    /**
     * @return string
     */
    public static function sampleEn(): string {
        return 'Name::en::32'; /*32:en*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromEs(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toEs(): string {
        if (Name::validateEs($this->es))  {
            return $this->es; /*string*/
        }
        throw new Exception('never get to this Name::es');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateEs(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::es");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getEs(): string {
        if (Name::validateEs($this->es))  {
            return $this->es;
        }
        throw new Exception('never get to getEs Name::es');
    }

    /**
     * @return string
     */
    public static function sampleEs(): string {
        return 'Name::es::33'; /*33:es*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromFr(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toFr(): string {
        if (Name::validateFr($this->fr))  {
            return $this->fr; /*string*/
        }
        throw new Exception('never get to this Name::fr');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateFr(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::fr");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getFr(): string {
        if (Name::validateFr($this->fr))  {
            return $this->fr;
        }
        throw new Exception('never get to getFr Name::fr');
    }

    /**
     * @return string
     */
    public static function sampleFr(): string {
        return 'Name::fr::34'; /*34:fr*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromJa(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toJa(): string {
        if (Name::validateJa($this->ja))  {
            return $this->ja; /*string*/
        }
        throw new Exception('never get to this Name::ja');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateJa(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::ja");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getJa(): string {
        if (Name::validateJa($this->ja))  {
            return $this->ja;
        }
        throw new Exception('never get to getJa Name::ja');
    }

    /**
     * @return string
     */
    public static function sampleJa(): string {
        return 'Name::ja::35'; /*35:ja*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromKo(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toKo(): string {
        if (Name::validateKo($this->ko))  {
            return $this->ko; /*string*/
        }
        throw new Exception('never get to this Name::ko');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateKo(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::ko");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getKo(): string {
        if (Name::validateKo($this->ko))  {
            return $this->ko;
        }
        throw new Exception('never get to getKo Name::ko');
    }

    /**
     * @return string
     */
    public static function sampleKo(): string {
        return 'Name::ko::36'; /*36:ko*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromRu(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toRu(): string {
        if (Name::validateRu($this->ru))  {
            return $this->ru; /*string*/
        }
        throw new Exception('never get to this Name::ru');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateRu(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::ru");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getRu(): string {
        if (Name::validateRu($this->ru))  {
            return $this->ru;
        }
        throw new Exception('never get to getRu Name::ru');
    }

    /**
     * @return string
     */
    public static function sampleRu(): string {
        return 'Name::ru::37'; /*37:ru*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return string
     */
    public static function fromZh(string $value): string {
        return $value; /*string*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toZh(): string {
        if (Name::validateZh($this->zh))  {
            return $this->zh; /*string*/
        }
        throw new Exception('never get to this Name::zh');
    }

    /**
     * @param string
     * @return bool
     * @throws Exception
     */
    public static function validateZh(string $value): bool {
        if (!is_string($value)) {
            throw new Exception("Attribute Error:Name::zh");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return string
     */
    public function getZh(): string {
        if (Name::validateZh($this->zh))  {
            return $this->zh;
        }
        throw new Exception('never get to getZh Name::zh');
    }

    /**
     * @return string
     */
    public static function sampleZh(): string {
        return 'Name::zh::38'; /*38:zh*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return Name::validateDe($this->de)
        || Name::validateEn($this->en)
        || Name::validateEs($this->es)
        || Name::validateFr($this->fr)
        || Name::validateJa($this->ja)
        || Name::validateKo($this->ko)
        || Name::validateRu($this->ru)
        || Name::validateZh($this->zh);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'de'} = $this->toDe();
        $out->{'en'} = $this->toEn();
        $out->{'es'} = $this->toEs();
        $out->{'fr'} = $this->toFr();
        $out->{'ja'} = $this->toJa();
        $out->{'ko'} = $this->toKo();
        $out->{'ru'} = $this->toRu();
        $out->{'zh'} = $this->toZh();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return Name
     * @throws Exception
     */
    public static function from(stdClass $obj): Name {
        return new Name(
         Name::fromDe($obj->{'de'})
        ,Name::fromEn($obj->{'en'})
        ,Name::fromEs($obj->{'es'})
        ,Name::fromFr($obj->{'fr'})
        ,Name::fromJa($obj->{'ja'})
        ,Name::fromKo($obj->{'ko'})
        ,Name::fromRu($obj->{'ru'})
        ,Name::fromZh($obj->{'zh'})
        );
    }

    /**
     * @return Name
     */
    public static function sample(): Name {
        return new Name(
         Name::sampleDe()
        ,Name::sampleEn()
        ,Name::sampleEs()
        ,Name::sampleFr()
        ,Name::sampleJa()
        ,Name::sampleKo()
        ,Name::sampleRu()
        ,Name::sampleZh()
        );
    }
}

// This is a autogenerated file:PreReqSkill

class PreReqSkill {
    private int $key; // json:_key Required
    private array $skills; // json:skills Required

    /**
     * @param int $key
     * @param array $skills
     */
    public function __construct(int $key, array $skills) {
        $this->key = $key;
        $this->skills = $skills;
    }

    /**
     * @param int $value
     * @throws Exception
     * @return int
     */
    public static function fromKey(int $value): int {
        return $value; /*int*/
    }

    /**
     * @throws Exception
     * @return int
     */
    public function toKey(): int {
        if (PreReqSkill::validateKey($this->key))  {
            return $this->key; /*int*/
        }
        throw new Exception('never get to this PreReqSkill::key');
    }

    /**
     * @param int
     * @return bool
     * @throws Exception
     */
    public static function validateKey(int $value): bool {
        if (!is_integer($value)) {
            throw new Exception("Attribute Error:PreReqSkill::key");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return int
     */
    public function getKey(): int {
        if (PreReqSkill::validateKey($this->key))  {
            return $this->key;
        }
        throw new Exception('never get to getKey PreReqSkill::key');
    }

    /**
     * @return int
     */
    public static function sampleKey(): int {
        return 31; /*31:key*/
    }

    /**
     * @param array $value
     * @throws Exception
     * @return array
     */
    public static function fromSkills(array $value): array {
        return  array_map(function ($value) {
            return Skill::from($value); /*class*/
        }, $value);
    }

    /**
     * @throws Exception
     * @return array
     */
    public function toSkills(): array {
        if (PreReqSkill::validateSkills($this->skills))  {
            return array_map(function ($value) {
                return $value->to(); /*class*/
            }, $this->skills);
        }
        throw new Exception('never get to this PreReqSkill::skills');
    }

    /**
     * @param array
     * @return bool
     * @throws Exception
     */
    public static function validateSkills(array $value): bool {
        if (!is_array($value)) {
            throw new Exception("Attribute Error:PreReqSkill::skills");
        }
        array_walk($value, function($value_v) {
            $value_v->validate();
        });
        return true;
    }

    /**
     * @throws Exception
     * @return array
     */
    public function getSkills(): array {
        if (PreReqSkill::validateSkills($this->skills))  {
            return $this->skills;
        }
        throw new Exception('never get to getSkills PreReqSkill::skills');
    }

    /**
     * @return array
     */
    public static function sampleSkills(): array {
        return  array(
            Skill::sample() /*32:*/
        ); /* 32:skills*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return PreReqSkill::validateKey($this->key)
        || PreReqSkill::validateSkills($this->skills);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'_key'} = $this->toKey();
        $out->{'skills'} = $this->toSkills();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return PreReqSkill
     * @throws Exception
     */
    public static function from(stdClass $obj): PreReqSkill {
        return new PreReqSkill(
         PreReqSkill::fromKey($obj->{'_key'})
        ,PreReqSkill::fromSkills($obj->{'skills'})
        );
    }

    /**
     * @return PreReqSkill
     */
    public static function sample(): PreReqSkill {
        return new PreReqSkill(
         PreReqSkill::sampleKey()
        ,PreReqSkill::sampleSkills()
        );
    }
}

// This is a autogenerated file:Skill

class Skill {
    private int $key; // json:_key Required
    private bool $display; // json:display Required
    private int $level; // json:level Required

    /**
     * @param int $key
     * @param bool $display
     * @param int $level
     */
    public function __construct(int $key, bool $display, int $level) {
        $this->key = $key;
        $this->display = $display;
        $this->level = $level;
    }

    /**
     * @param int $value
     * @throws Exception
     * @return int
     */
    public static function fromKey(int $value): int {
        return $value; /*int*/
    }

    /**
     * @throws Exception
     * @return int
     */
    public function toKey(): int {
        if (Skill::validateKey($this->key))  {
            return $this->key; /*int*/
        }
        throw new Exception('never get to this Skill::key');
    }

    /**
     * @param int
     * @return bool
     * @throws Exception
     */
    public static function validateKey(int $value): bool {
        if (!is_integer($value)) {
            throw new Exception("Attribute Error:Skill::key");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return int
     */
    public function getKey(): int {
        if (Skill::validateKey($this->key))  {
            return $this->key;
        }
        throw new Exception('never get to getKey Skill::key');
    }

    /**
     * @return int
     */
    public static function sampleKey(): int {
        return 31; /*31:key*/
    }

    /**
     * @param bool $value
     * @throws Exception
     * @return bool
     */
    public static function fromDisplay(bool $value): bool {
        return $value; /*bool*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function toDisplay(): bool {
        if (Skill::validateDisplay($this->display))  {
            return $this->display; /*bool*/
        }
        throw new Exception('never get to this Skill::display');
    }

    /**
     * @param bool
     * @return bool
     * @throws Exception
     */
    public static function validateDisplay(bool $value): bool {
        if (!is_bool($value)) {
            throw new Exception("Attribute Error:Skill::display");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function getDisplay(): bool {
        if (Skill::validateDisplay($this->display))  {
            return $this->display;
        }
        throw new Exception('never get to getDisplay Skill::display');
    }

    /**
     * @return bool
     */
    public static function sampleDisplay(): bool {
        return true; /*32:display*/
    }

    /**
     * @param int $value
     * @throws Exception
     * @return int
     */
    public static function fromLevel(int $value): int {
        return $value; /*int*/
    }

    /**
     * @throws Exception
     * @return int
     */
    public function toLevel(): int {
        if (Skill::validateLevel($this->level))  {
            return $this->level; /*int*/
        }
        throw new Exception('never get to this Skill::level');
    }

    /**
     * @param int
     * @return bool
     * @throws Exception
     */
    public static function validateLevel(int $value): bool {
        if (!is_integer($value)) {
            throw new Exception("Attribute Error:Skill::level");
        }
        return true;
    }

    /**
     * @throws Exception
     * @return int
     */
    public function getLevel(): int {
        if (Skill::validateLevel($this->level))  {
            return $this->level;
        }
        throw new Exception('never get to getLevel Skill::level');
    }

    /**
     * @return int
     */
    public static function sampleLevel(): int {
        return 33; /*33:level*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return Skill::validateKey($this->key)
        || Skill::validateDisplay($this->display)
        || Skill::validateLevel($this->level);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'_key'} = $this->toKey();
        $out->{'display'} = $this->toDisplay();
        $out->{'level'} = $this->toLevel();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return Skill
     * @throws Exception
     */
    public static function from(stdClass $obj): Skill {
        return new Skill(
         Skill::fromKey($obj->{'_key'})
        ,Skill::fromDisplay($obj->{'display'})
        ,Skill::fromLevel($obj->{'level'})
        );
    }

    /**
     * @return Skill
     */
    public static function sample(): Skill {
        return new Skill(
         Skill::sampleKey()
        ,Skill::sampleDisplay()
        ,Skill::sampleLevel()
        );
    }
}
from typing import Any, List, Optional, TypeVar, Callable, Type, cast


T = TypeVar("T")


def from_str(x: Any) -> str:
    assert isinstance(x, str)
    return x


def from_int(x: Any) -> int:
    assert isinstance(x, int) and not isinstance(x, bool)
    return x


def from_bool(x: Any) -> bool:
    assert isinstance(x, bool)
    return x


def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
    assert isinstance(x, list)
    return [f(y) for y in x]


def to_class(c: Type[T], x: Any) -> dict:
    assert isinstance(x, c)
    return cast(Any, x).to_dict()


def from_none(x: Any) -> Any:
    assert x is None
    return x


def from_union(fs, x):
    for f in fs:
        try:
            return f(x)
        except:
            pass
    assert False


class Description:
    de: str
    en: str
    es: str
    fr: str
    ja: str
    ko: str
    ru: str
    zh: str

    def __init__(self, de: str, en: str, es: str, fr: str, ja: str, ko: str, ru: str, zh: str) -> None:
        self.de = de
        self.en = en
        self.es = es
        self.fr = fr
        self.ja = ja
        self.ko = ko
        self.ru = ru
        self.zh = zh

    @staticmethod
    def from_dict(obj: Any) -> 'Description':
        assert isinstance(obj, dict)
        de = from_str(obj.get("de"))
        en = from_str(obj.get("en"))
        es = from_str(obj.get("es"))
        fr = from_str(obj.get("fr"))
        ja = from_str(obj.get("ja"))
        ko = from_str(obj.get("ko"))
        ru = from_str(obj.get("ru"))
        zh = from_str(obj.get("zh"))
        return Description(de, en, es, fr, ja, ko, ru, zh)

    def to_dict(self) -> dict:
        result: dict = {}
        result["de"] = from_str(self.de)
        result["en"] = from_str(self.en)
        result["es"] = from_str(self.es)
        result["fr"] = from_str(self.fr)
        result["ja"] = from_str(self.ja)
        result["ko"] = from_str(self.ko)
        result["ru"] = from_str(self.ru)
        result["zh"] = from_str(self.zh)
        return result


class Element:
    key: int
    value: int

    def __init__(self, key: int, value: int) -> None:
        self.key = key
        self.value = value

    @staticmethod
    def from_dict(obj: Any) -> 'Element':
        assert isinstance(obj, dict)
        key = from_int(obj.get("_key"))
        value = from_int(obj.get("_value"))
        return Element(key, value)

    def to_dict(self) -> dict:
        result: dict = {}
        result["_key"] = from_int(self.key)
        result["_value"] = from_int(self.value)
        return result


class Name:
    de: str
    en: str
    es: str
    fr: str
    ja: str
    ko: str
    ru: str
    zh: str

    def __init__(self, de: str, en: str, es: str, fr: str, ja: str, ko: str, ru: str, zh: str) -> None:
        self.de = de
        self.en = en
        self.es = es
        self.fr = fr
        self.ja = ja
        self.ko = ko
        self.ru = ru
        self.zh = zh

    @staticmethod
    def from_dict(obj: Any) -> 'Name':
        assert isinstance(obj, dict)
        de = from_str(obj.get("de"))
        en = from_str(obj.get("en"))
        es = from_str(obj.get("es"))
        fr = from_str(obj.get("fr"))
        ja = from_str(obj.get("ja"))
        ko = from_str(obj.get("ko"))
        ru = from_str(obj.get("ru"))
        zh = from_str(obj.get("zh"))
        return Name(de, en, es, fr, ja, ko, ru, zh)

    def to_dict(self) -> dict:
        result: dict = {}
        result["de"] = from_str(self.de)
        result["en"] = from_str(self.en)
        result["es"] = from_str(self.es)
        result["fr"] = from_str(self.fr)
        result["ja"] = from_str(self.ja)
        result["ko"] = from_str(self.ko)
        result["ru"] = from_str(self.ru)
        result["zh"] = from_str(self.zh)
        return result


class Skill:
    key: int
    display: bool
    level: int

    def __init__(self, key: int, display: bool, level: int) -> None:
        self.key = key
        self.display = display
        self.level = level

    @staticmethod
    def from_dict(obj: Any) -> 'Skill':
        assert isinstance(obj, dict)
        key = from_int(obj.get("_key"))
        display = from_bool(obj.get("display"))
        level = from_int(obj.get("level"))
        return Skill(key, display, level)

    def to_dict(self) -> dict:
        result: dict = {}
        result["_key"] = from_int(self.key)
        result["display"] = from_bool(self.display)
        result["level"] = from_int(self.level)
        return result


class PreReqSkill:
    key: int
    skills: List[Skill]

    def __init__(self, key: int, skills: List[Skill]) -> None:
        self.key = key
        self.skills = skills

    @staticmethod
    def from_dict(obj: Any) -> 'PreReqSkill':
        assert isinstance(obj, dict)
        key = from_int(obj.get("_key"))
        skills = from_list(Skill.from_dict, obj.get("skills"))
        return PreReqSkill(key, skills)

    def to_dict(self) -> dict:
        result: dict = {}
        result["_key"] = from_int(self.key)
        result["skills"] = from_list(lambda x: to_class(Skill, x), self.skills)
        return result


class ShipTreeGroup:
    key: int
    description: Optional[Description]
    elements: Optional[List[Element]]
    icon: str
    icon_large: str
    icon_small: str
    icon_small_npc: str
    name: Name
    pre_req_skills: Optional[List[PreReqSkill]]

    def __init__(self, key: int, description: Optional[Description], elements: Optional[List[Element]], icon: str, icon_large: str, icon_small: str, icon_small_npc: str, name: Name, pre_req_skills: Optional[List[PreReqSkill]]) -> None:
        self.key = key
        self.description = description
        self.elements = elements
        self.icon = icon
        self.icon_large = icon_large
        self.icon_small = icon_small
        self.icon_small_npc = icon_small_npc
        self.name = name
        self.pre_req_skills = pre_req_skills

    @staticmethod
    def from_dict(obj: Any) -> 'ShipTreeGroup':
        assert isinstance(obj, dict)
        key = from_int(obj.get("_key"))
        description = from_union([Description.from_dict, from_none], obj.get("description"))
        elements = from_union([lambda x: from_list(Element.from_dict, x), from_none], obj.get("elements"))
        icon = from_str(obj.get("icon"))
        icon_large = from_str(obj.get("iconLarge"))
        icon_small = from_str(obj.get("iconSmall"))
        icon_small_npc = from_str(obj.get("iconSmallNPC"))
        name = Name.from_dict(obj.get("name"))
        pre_req_skills = from_union([lambda x: from_list(PreReqSkill.from_dict, x), from_none], obj.get("preReqSkills"))
        return ShipTreeGroup(key, description, elements, icon, icon_large, icon_small, icon_small_npc, name, pre_req_skills)

    def to_dict(self) -> dict:
        result: dict = {}
        result["_key"] = from_int(self.key)
        if self.description is not None:
            result["description"] = from_union([lambda x: to_class(Description, x), from_none], self.description)
        if self.elements is not None:
            result["elements"] = from_union([lambda x: from_list(lambda x: to_class(Element, x), x), from_none], self.elements)
        result["icon"] = from_str(self.icon)
        result["iconLarge"] = from_str(self.icon_large)
        result["iconSmall"] = from_str(self.icon_small)
        result["iconSmallNPC"] = from_str(self.icon_small_npc)
        result["name"] = to_class(Name, self.name)
        if self.pre_req_skills is not None:
            result["preReqSkills"] = from_union([lambda x: from_list(lambda x: to_class(PreReqSkill, x), x), from_none], self.pre_req_skills)
        return result


def ship_tree_group_from_dict(s: Any) -> ShipTreeGroup:
    return ShipTreeGroup.from_dict(s)


def ship_tree_group_to_dict(x: ShipTreeGroup) -> Any:
    return to_class(ShipTreeGroup, x)
// To parse this data:
//
//   import { Convert, ShipTreeGroup } from "./file";
//
//   const shipTreeGroup = Convert.toShipTreeGroup(json);
//
// These functions will throw an error if the JSON doesn't
// match the expected interface, even if the JSON is valid.

export interface ShipTreeGroup {
    _key:          number;
    description?:  Description;
    elements?:     Element[];
    icon:          string;
    iconLarge:     string;
    iconSmall:     string;
    iconSmallNPC:  string;
    name:          Name;
    preReqSkills?: PreReqSkill[];
    [property: string]: any;
}

export interface Description {
    de: string;
    en: string;
    es: string;
    fr: string;
    ja: string;
    ko: string;
    ru: string;
    zh: string;
    [property: string]: any;
}

export interface Element {
    _key:   number;
    _value: number;
    [property: string]: any;
}

export interface Name {
    de: string;
    en: string;
    es: string;
    fr: string;
    ja: string;
    ko: string;
    ru: string;
    zh: string;
    [property: string]: any;
}

export interface PreReqSkill {
    _key:   number;
    skills: Skill[];
    [property: string]: any;
}

export interface Skill {
    _key:    number;
    display: boolean;
    level:   number;
    [property: string]: any;
}

// Converts JSON strings to/from your types
// and asserts the results of JSON.parse at runtime
export class Convert {
    public static toShipTreeGroup(json: string): ShipTreeGroup {
        return cast(JSON.parse(json), r("ShipTreeGroup"));
    }

    public static shipTreeGroupToJson(value: ShipTreeGroup): string {
        return JSON.stringify(uncast(value, r("ShipTreeGroup")), null, 2);
    }
}

function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
    const prettyTyp = prettyTypeName(typ);
    const parentText = parent ? ` on ${parent}` : '';
    const keyText = key ? ` for key "${key}"` : '';
    throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
}

function prettyTypeName(typ: any): string {
    if (Array.isArray(typ)) {
        if (typ.length === 2 && typ[0] === undefined) {
            return `an optional ${prettyTypeName(typ[1])}`;
        } else {
            return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
        }
    } else if (typeof typ === "object" && typ.literal !== undefined) {
        return typ.literal;
    } else {
        return typeof typ;
    }
}

function jsonToJSProps(typ: any): any {
    if (typ.jsonToJS === undefined) {
        const map: any = {};
        typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
        typ.jsonToJS = map;
    }
    return typ.jsonToJS;
}

function jsToJSONProps(typ: any): any {
    if (typ.jsToJSON === undefined) {
        const map: any = {};
        typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
        typ.jsToJSON = map;
    }
    return typ.jsToJSON;
}

function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
    function transformPrimitive(typ: string, val: any): any {
        if (typeof typ === typeof val) return val;
        return invalidValue(typ, val, key, parent);
    }

    function transformUnion(typs: any[], val: any): any {
        // val must validate against one typ in typs
        const l = typs.length;
        for (let i = 0; i < l; i++) {
            const typ = typs[i];
            try {
                return transform(val, typ, getProps);
            } catch (_) {}
        }
        return invalidValue(typs, val, key, parent);
    }

    function transformEnum(cases: string[], val: any): any {
        if (cases.indexOf(val) !== -1) return val;
        return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
    }

    function transformArray(typ: any, val: any): any {
        // val must be an array with no invalid elements
        if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
        return val.map(el => transform(el, typ, getProps));
    }

    function transformDate(val: any): any {
        if (val === null) {
            return null;
        }
        const d = new Date(val);
        if (isNaN(d.valueOf())) {
            return invalidValue(l("Date"), val, key, parent);
        }
        return d;
    }

    function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
        if (val === null || typeof val !== "object" || Array.isArray(val)) {
            return invalidValue(l(ref || "object"), val, key, parent);
        }
        const result: any = {};
        Object.getOwnPropertyNames(props).forEach(key => {
            const prop = props[key];
            const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
            result[prop.key] = transform(v, prop.typ, getProps, key, ref);
        });
        Object.getOwnPropertyNames(val).forEach(key => {
            if (!Object.prototype.hasOwnProperty.call(props, key)) {
                result[key] = transform(val[key], additional, getProps, key, ref);
            }
        });
        return result;
    }

    if (typ === "any") return val;
    if (typ === null) {
        if (val === null) return val;
        return invalidValue(typ, val, key, parent);
    }
    if (typ === false) return invalidValue(typ, val, key, parent);
    let ref: any = undefined;
    while (typeof typ === "object" && typ.ref !== undefined) {
        ref = typ.ref;
        typ = typeMap[typ.ref];
    }
    if (Array.isArray(typ)) return transformEnum(typ, val);
    if (typeof typ === "object") {
        return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
            : typ.hasOwnProperty("arrayItems")    ? transformArray(typ.arrayItems, val)
            : typ.hasOwnProperty("props")         ? transformObject(getProps(typ), typ.additional, val)
            : invalidValue(typ, val, key, parent);
    }
    // Numbers can be parsed by Date but shouldn't be.
    if (typ === Date && typeof val !== "number") return transformDate(val);
    return transformPrimitive(typ, val);
}

function cast<T>(val: any, typ: any): T {
    return transform(val, typ, jsonToJSProps);
}

function uncast<T>(val: T, typ: any): any {
    return transform(val, typ, jsToJSONProps);
}

function l(typ: any) {
    return { literal: typ };
}

function a(typ: any) {
    return { arrayItems: typ };
}

function u(...typs: any[]) {
    return { unionMembers: typs };
}

function o(props: any[], additional: any) {
    return { props, additional };
}

function m(additional: any) {
    return { props: [], additional };
}

function r(name: string) {
    return { ref: name };
}

const typeMap: any = {
    "ShipTreeGroup": o([
        { json: "_key", js: "_key", typ: 0 },
        { json: "description", js: "description", typ: u(undefined, r("Description")) },
        { json: "elements", js: "elements", typ: u(undefined, a(r("Element"))) },
        { json: "icon", js: "icon", typ: "" },
        { json: "iconLarge", js: "iconLarge", typ: "" },
        { json: "iconSmall", js: "iconSmall", typ: "" },
        { json: "iconSmallNPC", js: "iconSmallNPC", typ: "" },
        { json: "name", js: "name", typ: r("Name") },
        { json: "preReqSkills", js: "preReqSkills", typ: u(undefined, a(r("PreReqSkill"))) },
    ], "any"),
    "Description": o([
        { json: "de", js: "de", typ: "" },
        { json: "en", js: "en", typ: "" },
        { json: "es", js: "es", typ: "" },
        { json: "fr", js: "fr", typ: "" },
        { json: "ja", js: "ja", typ: "" },
        { json: "ko", js: "ko", typ: "" },
        { json: "ru", js: "ru", typ: "" },
        { json: "zh", js: "zh", typ: "" },
    ], "any"),
    "Element": o([
        { json: "_key", js: "_key", typ: 0 },
        { json: "_value", js: "_value", typ: 0 },
    ], "any"),
    "Name": o([
        { json: "de", js: "de", typ: "" },
        { json: "en", js: "en", typ: "" },
        { json: "es", js: "es", typ: "" },
        { json: "fr", js: "fr", typ: "" },
        { json: "ja", js: "ja", typ: "" },
        { json: "ko", js: "ko", typ: "" },
        { json: "ru", js: "ru", typ: "" },
        { json: "zh", js: "zh", typ: "" },
    ], "any"),
    "PreReqSkill": o([
        { json: "_key", js: "_key", typ: 0 },
        { json: "skills", js: "skills", typ: a(r("Skill")) },
    ], "any"),
    "Skill": o([
        { json: "_key", js: "_key", typ: 0 },
        { json: "display", js: "display", typ: true },
        { json: "level", js: "level", typ: 0 },
    ], "any"),
};