Skip to content

EVE SDE Schema

Documentation for third-party developers

dogmaEffects.jsonl

Schema

  • _key (required): integer
    Range: 4 .. 12579
  • 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
  • disallowAutoRepeat (required): boolean

  • dischargeAttributeID: integer
    Range: 6 .. 5660
  • displayName: 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
  • distribution: integer
    Range: 1 .. 2

  • durationAttributeID: integer
    Range: 51 .. 5657
  • effectCategory (required): integer
    Range: 0 .. 7
  • effectID (required): integer
    Range: 4 .. 12579
  • effectName (required): string
  • electronicChance (required): boolean
  • falloffAttributeID: integer
    Range: 158 .. 5659
  • fittingUsageChanceAttributeID: integer
    Range: 1089 .. 1093
  • guid: string
  • iconID: integer
    Range: 0 .. 3756
  • isAssistance (required): boolean
  • isOffensive (required): boolean
  • isWarpSafe (required): boolean
  • modifierInfo: array of object

    • domain (required): enum
      Enum values: shipID, targetID, charID, itemID, otherID, target, structureID
    • effectID: integer
      Range: 4921 .. 6442
    • func (required): enum
      Enum values: ItemModifier, LocationModifier, LocationGroupModifier, LocationRequiredSkillModifier, OwnerRequiredSkillModifier, EffectStopper
    • groupID: integer
      Range: 38 .. 4117
    • modifiedAttributeID: integer
      Range: 4 .. 5960
    • modifyingAttributeID: integer
      Range: 4 .. 5964
    • operation: integer
      Range: -1 .. 9
    • skillTypeID: integer
      Range: 3300 .. 86260
  • npcActivationChanceAttributeID: integer
    Range: 930 .. 1682

  • npcUsageChanceAttributeID: integer
    Range: 504 .. 1664
  • propulsionChance (required): boolean
  • published (required): boolean
  • rangeAttributeID: integer
    Range: 54 .. 5658
  • rangeChance (required): boolean
  • resistanceAttributeID: integer
    Range: 2045 .. 2253
  • sfxName: enum
    Enum values: None
  • trackingSpeedAttributeID: integer
    Range: 160 .. 160

Code snippets

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

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

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

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

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

        [JsonProperty("disallowAutoRepeat")]
        public bool DisallowAutoRepeat { get; set; }

        [JsonProperty("dischargeAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? DischargeAttributeId { get; set; }

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

        [JsonProperty("distribution", NullValueHandling = NullValueHandling.Ignore)]
        public long? Distribution { get; set; }

        [JsonProperty("durationAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? DurationAttributeId { get; set; }

        [JsonProperty("effectCategory")]
        public long EffectCategory { get; set; }

        [JsonProperty("effectID")]
        public long EffectId { get; set; }

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

        [JsonProperty("electronicChance")]
        public bool ElectronicChance { get; set; }

        [JsonProperty("falloffAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? FalloffAttributeId { get; set; }

        [JsonProperty("fittingUsageChanceAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? FittingUsageChanceAttributeId { get; set; }

        [JsonProperty("guid", NullValueHandling = NullValueHandling.Ignore)]
        [JsonConverter(typeof(MinMaxLengthCheckConverter4))]
        public string Guid { get; set; }

        [JsonProperty("iconID", NullValueHandling = NullValueHandling.Ignore)]
        public long? IconId { get; set; }

        [JsonProperty("isAssistance")]
        public bool IsAssistance { get; set; }

        [JsonProperty("isOffensive")]
        public bool IsOffensive { get; set; }

        [JsonProperty("isWarpSafe")]
        public bool IsWarpSafe { get; set; }

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

        [JsonProperty("npcActivationChanceAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? NpcActivationChanceAttributeId { get; set; }

        [JsonProperty("npcUsageChanceAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? NpcUsageChanceAttributeId { get; set; }

        [JsonProperty("propulsionChance")]
        public bool PropulsionChance { get; set; }

        [JsonProperty("published")]
        public bool Published { get; set; }

        [JsonProperty("rangeAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? RangeAttributeId { get; set; }

        [JsonProperty("rangeChance")]
        public bool RangeChance { get; set; }

        [JsonProperty("resistanceAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? ResistanceAttributeId { get; set; }

        [JsonProperty("sfxName", NullValueHandling = NullValueHandling.Ignore)]
        public SfxName? SfxName { get; set; }

        [JsonProperty("trackingSpeedAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? TrackingSpeedAttributeId { 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 DisplayName
    {
        [JsonProperty("de")]
        [JsonConverter(typeof(CunningMinMaxLengthCheckConverter))]
        public string De { get; set; }

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

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

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

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

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

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

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

    public partial class ModifierInfo
    {
        [JsonProperty("domain")]
        public Domain Domain { get; set; }

        [JsonProperty("effectID", NullValueHandling = NullValueHandling.Ignore)]
        public long? EffectId { get; set; }

        [JsonProperty("func")]
        public Func Func { get; set; }

        [JsonProperty("groupID", NullValueHandling = NullValueHandling.Ignore)]
        public long? GroupId { get; set; }

        [JsonProperty("modifiedAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? ModifiedAttributeId { get; set; }

        [JsonProperty("modifyingAttributeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? ModifyingAttributeId { get; set; }

        [JsonProperty("operation", NullValueHandling = NullValueHandling.Ignore)]
        public long? Operation { get; set; }

        [JsonProperty("skillTypeID", NullValueHandling = NullValueHandling.Ignore)]
        public long? SkillTypeId { get; set; }
    }

    public enum Domain { CharId, ItemId, OtherId, ShipId, StructureId, Target, TargetId };

    public enum Func { EffectStopper, ItemModifier, LocationGroupModifier, LocationModifier, LocationRequiredSkillModifier, OwnerRequiredSkillModifier };

    public enum SfxName { None };

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

    public static class Serialize
    {
        public static string ToJson(this DogmaEffect 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 =
            {
                DomainConverter.Singleton,
                FuncConverter.Singleton,
                SfxNameConverter.Singleton,
                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 >= 5 && value.Length <= 105)
            {
                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 <= 105)
            {
                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 >= 6 && 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 >= 6 && value.Length <= 77)
            {
                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 >= 8 && value.Length <= 110)
            {
                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 >= 8 && value.Length <= 110)
            {
                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 >= 6 && value.Length <= 120)
            {
                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 <= 120)
            {
                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 >= 2 && value.Length <= 36)
            {
                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 <= 36)
            {
                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 >= 2 && 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 >= 2 && value.Length <= 40)
            {
                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 >= 6 && value.Length <= 109)
            {
                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 <= 109)
            {
                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 >= 2 && value.Length <= 30)
            {
                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 <= 30)
            {
                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 >= 6 && value.Length <= 52)
            {
                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 <= 52)
            {
                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 >= 6 && value.Length <= 38)
            {
                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 <= 38)
            {
                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 >= 7 && value.Length <= 54)
            {
                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 >= 7 && value.Length <= 54)
            {
                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 >= 7 && value.Length <= 48)
            {
                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 >= 7 && value.Length <= 48)
            {
                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 >= 2 && 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 >= 2 && value.Length <= 26)
            {
                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 >= 2 && 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 >= 2 && value.Length <= 31)
            {
                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 >= 6 && value.Length <= 61)
            {
                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 <= 61)
            {
                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 >= 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 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 >= 0 && value.Length <= 54)
            {
                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 >= 0 && value.Length <= 54)
            {
                serializer.Serialize(writer, value);
                return;
            }
            throw new Exception("Cannot marshal type string");
        }

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

    internal class DomainConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(Domain) || t == typeof(Domain?);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            if (reader.TokenType == JsonToken.Null) return null;
            var value = serializer.Deserialize<string>(reader);
            switch (value)
            {
                case "charID":
                    return Domain.CharId;
                case "itemID":
                    return Domain.ItemId;
                case "otherID":
                    return Domain.OtherId;
                case "shipID":
                    return Domain.ShipId;
                case "structureID":
                    return Domain.StructureId;
                case "target":
                    return Domain.Target;
                case "targetID":
                    return Domain.TargetId;
            }
            throw new Exception("Cannot unmarshal type Domain");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            if (untypedValue == null)
            {
                serializer.Serialize(writer, null);
                return;
            }
            var value = (Domain)untypedValue;
            switch (value)
            {
                case Domain.CharId:
                    serializer.Serialize(writer, "charID");
                    return;
                case Domain.ItemId:
                    serializer.Serialize(writer, "itemID");
                    return;
                case Domain.OtherId:
                    serializer.Serialize(writer, "otherID");
                    return;
                case Domain.ShipId:
                    serializer.Serialize(writer, "shipID");
                    return;
                case Domain.StructureId:
                    serializer.Serialize(writer, "structureID");
                    return;
                case Domain.Target:
                    serializer.Serialize(writer, "target");
                    return;
                case Domain.TargetId:
                    serializer.Serialize(writer, "targetID");
                    return;
            }
            throw new Exception("Cannot marshal type Domain");
        }

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

    internal class FuncConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(Func) || t == typeof(Func?);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            if (reader.TokenType == JsonToken.Null) return null;
            var value = serializer.Deserialize<string>(reader);
            switch (value)
            {
                case "EffectStopper":
                    return Func.EffectStopper;
                case "ItemModifier":
                    return Func.ItemModifier;
                case "LocationGroupModifier":
                    return Func.LocationGroupModifier;
                case "LocationModifier":
                    return Func.LocationModifier;
                case "LocationRequiredSkillModifier":
                    return Func.LocationRequiredSkillModifier;
                case "OwnerRequiredSkillModifier":
                    return Func.OwnerRequiredSkillModifier;
            }
            throw new Exception("Cannot unmarshal type Func");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            if (untypedValue == null)
            {
                serializer.Serialize(writer, null);
                return;
            }
            var value = (Func)untypedValue;
            switch (value)
            {
                case Func.EffectStopper:
                    serializer.Serialize(writer, "EffectStopper");
                    return;
                case Func.ItemModifier:
                    serializer.Serialize(writer, "ItemModifier");
                    return;
                case Func.LocationGroupModifier:
                    serializer.Serialize(writer, "LocationGroupModifier");
                    return;
                case Func.LocationModifier:
                    serializer.Serialize(writer, "LocationModifier");
                    return;
                case Func.LocationRequiredSkillModifier:
                    serializer.Serialize(writer, "LocationRequiredSkillModifier");
                    return;
                case Func.OwnerRequiredSkillModifier:
                    serializer.Serialize(writer, "OwnerRequiredSkillModifier");
                    return;
            }
            throw new Exception("Cannot marshal type Func");
        }

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

    internal class SfxNameConverter : JsonConverter
    {
        public override bool CanConvert(Type t) => t == typeof(SfxName) || t == typeof(SfxName?);

        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
        {
            if (reader.TokenType == JsonToken.Null) return null;
            var value = serializer.Deserialize<string>(reader);
            if (value == "None")
            {
                return SfxName.None;
            }
            throw new Exception("Cannot unmarshal type SfxName");
        }

        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
        {
            if (untypedValue == null)
            {
                serializer.Serialize(writer, null);
                return;
            }
            var value = (SfxName)untypedValue;
            if (value == SfxName.None)
            {
                serializer.Serialize(writer, "None");
                return;
            }
            throw new Exception("Cannot marshal type SfxName");
        }

        public static readonly SfxNameConverter Singleton = new SfxNameConverter();
    }
}
// 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:
//
//    dogmaEffect, err := UnmarshalDogmaEffect(bytes)
//    bytes, err = dogmaEffect.Marshal()

package model

import "encoding/json"

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

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

type DogmaEffect struct {
    Key                            int64          `json:"_key"`
    Description                    *Description   `json:"description,omitempty"`
    DisallowAutoRepeat             bool           `json:"disallowAutoRepeat"`
    DischargeAttributeID           *int64         `json:"dischargeAttributeID,omitempty"`
    DisplayName                    *DisplayName   `json:"displayName,omitempty"`
    Distribution                   *int64         `json:"distribution,omitempty"`
    DurationAttributeID            *int64         `json:"durationAttributeID,omitempty"`
    EffectCategory                 int64          `json:"effectCategory"`
    EffectID                       int64          `json:"effectID"`
    EffectName                     string         `json:"effectName"`
    ElectronicChance               bool           `json:"electronicChance"`
    FalloffAttributeID             *int64         `json:"falloffAttributeID,omitempty"`
    FittingUsageChanceAttributeID  *int64         `json:"fittingUsageChanceAttributeID,omitempty"`
    GUID                           *string        `json:"guid,omitempty"`
    IconID                         *int64         `json:"iconID,omitempty"`
    IsAssistance                   bool           `json:"isAssistance"`
    IsOffensive                    bool           `json:"isOffensive"`
    IsWarpSafe                     bool           `json:"isWarpSafe"`
    ModifierInfo                   []ModifierInfo `json:"modifierInfo,omitempty"`
    NpcActivationChanceAttributeID *int64         `json:"npcActivationChanceAttributeID,omitempty"`
    NpcUsageChanceAttributeID      *int64         `json:"npcUsageChanceAttributeID,omitempty"`
    PropulsionChance               bool           `json:"propulsionChance"`
    Published                      bool           `json:"published"`
    RangeAttributeID               *int64         `json:"rangeAttributeID,omitempty"`
    RangeChance                    bool           `json:"rangeChance"`
    ResistanceAttributeID          *int64         `json:"resistanceAttributeID,omitempty"`
    SfxName                        *SfxName       `json:"sfxName,omitempty"`
    TrackingSpeedAttributeID       *int64         `json:"trackingSpeedAttributeID,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 DisplayName 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 ModifierInfo struct {
    Domain               Domain `json:"domain"`
    EffectID             *int64 `json:"effectID,omitempty"`
    Func                 Func   `json:"func"`
    GroupID              *int64 `json:"groupID,omitempty"`
    ModifiedAttributeID  *int64 `json:"modifiedAttributeID,omitempty"`
    ModifyingAttributeID *int64 `json:"modifyingAttributeID,omitempty"`
    Operation            *int64 `json:"operation,omitempty"`
    SkillTypeID          *int64 `json:"skillTypeID,omitempty"`
}

type Domain string

const (
    CharID      Domain = "charID"
    ItemID      Domain = "itemID"
    OtherID     Domain = "otherID"
    ShipID      Domain = "shipID"
    StructureID Domain = "structureID"
    Target      Domain = "target"
    TargetID    Domain = "targetID"
)

type Func string

const (
    EffectStopper                 Func = "EffectStopper"
    ItemModifier                  Func = "ItemModifier"
    LocationGroupModifier         Func = "LocationGroupModifier"
    LocationModifier              Func = "LocationModifier"
    LocationRequiredSkillModifier Func = "LocationRequiredSkillModifier"
    OwnerRequiredSkillModifier    Func = "OwnerRequiredSkillModifier"
)

type SfxName string

const (
    None SfxName = "None"
)
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
        "_key": {
            "type": "integer",
            "minimum": 4,
            "maximum": 12579
        },
        "description": {
            "type": "object",
            "properties": {
                "de": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 105
                },
                "en": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 77
                },
                "es": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 110
                },
                "fr": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 120
                },
                "ja": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 36
                },
                "ko": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 40
                },
                "ru": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 109
                },
                "zh": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 30
                }
            },
            "required": [
                "de",
                "en",
                "es",
                "fr",
                "ja",
                "ko",
                "ru",
                "zh"
            ]
        },
        "disallowAutoRepeat": {
            "type": "boolean"
        },
        "dischargeAttributeID": {
            "type": "integer",
            "minimum": 6,
            "maximum": 5660
        },
        "displayName": {
            "type": "object",
            "properties": {
                "de": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 52
                },
                "en": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 38
                },
                "es": {
                    "type": "string",
                    "minLength": 7,
                    "maxLength": 54
                },
                "fr": {
                    "type": "string",
                    "minLength": 7,
                    "maxLength": 48
                },
                "ja": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 26
                },
                "ko": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 31
                },
                "ru": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 61
                },
                "zh": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 13
                }
            },
            "required": [
                "de",
                "en",
                "es",
                "fr",
                "ja",
                "ko",
                "ru",
                "zh"
            ]
        },
        "distribution": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2
        },
        "durationAttributeID": {
            "type": "integer",
            "minimum": 51,
            "maximum": 5657
        },
        "effectCategory": {
            "type": "integer",
            "minimum": 0,
            "maximum": 7
        },
        "effectID": {
            "type": "integer",
            "minimum": 4,
            "maximum": 12579
        },
        "effectName": {
            "type": "string",
            "minLength": 6,
            "maxLength": 120
        },
        "electronicChance": {
            "type": "boolean"
        },
        "falloffAttributeID": {
            "type": "integer",
            "minimum": 158,
            "maximum": 5659
        },
        "fittingUsageChanceAttributeID": {
            "type": "integer",
            "minimum": 1089,
            "maximum": 1093
        },
        "guid": {
            "type": "string",
            "minLength": 0,
            "maxLength": 54
        },
        "iconID": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3756
        },
        "isAssistance": {
            "type": "boolean"
        },
        "isOffensive": {
            "type": "boolean"
        },
        "isWarpSafe": {
            "type": "boolean"
        },
        "modifierInfo": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "domain": {
                        "type": "string",
                        "enum": [
                            "shipID",
                            "targetID",
                            "charID",
                            "itemID",
                            "otherID",
                            "target",
                            "structureID"
                        ]
                    },
                    "effectID": {
                        "type": "integer",
                        "minimum": 4921,
                        "maximum": 6442
                    },
                    "func": {
                        "type": "string",
                        "enum": [
                            "ItemModifier",
                            "LocationModifier",
                            "LocationGroupModifier",
                            "LocationRequiredSkillModifier",
                            "OwnerRequiredSkillModifier",
                            "EffectStopper"
                        ]
                    },
                    "groupID": {
                        "type": "integer",
                        "minimum": 38,
                        "maximum": 4117
                    },
                    "modifiedAttributeID": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 5960
                    },
                    "modifyingAttributeID": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 5964
                    },
                    "operation": {
                        "type": "integer",
                        "minimum": -1,
                        "maximum": 9
                    },
                    "skillTypeID": {
                        "type": "integer",
                        "minimum": 3300,
                        "maximum": 86260
                    }
                },
                "required": [
                    "domain",
                    "func"
                ]
            },
            "minItems": 1,
            "maxItems": 49
        },
        "npcActivationChanceAttributeID": {
            "type": "integer",
            "minimum": 930,
            "maximum": 1682
        },
        "npcUsageChanceAttributeID": {
            "type": "integer",
            "minimum": 504,
            "maximum": 1664
        },
        "propulsionChance": {
            "type": "boolean"
        },
        "published": {
            "type": "boolean"
        },
        "rangeAttributeID": {
            "type": "integer",
            "minimum": 54,
            "maximum": 5658
        },
        "rangeChance": {
            "type": "boolean"
        },
        "resistanceAttributeID": {
            "type": "integer",
            "minimum": 2045,
            "maximum": 2253
        },
        "sfxName": {
            "type": "string",
            "enum": [
                "None"
            ]
        },
        "trackingSpeedAttributeID": {
            "type": "integer",
            "minimum": 160,
            "maximum": 160
        }
    },
    "required": [
        "_key",
        "disallowAutoRepeat",
        "effectCategory",
        "effectID",
        "effectName",
        "electronicChance",
        "isAssistance",
        "isOffensive",
        "isWarpSafe",
        "propulsionChance",
        "published",
        "rangeChance"
    ]
}
// To parse the JSON, install kotlin's serialization plugin and do:
//
// val json        = Json { allowStructuredMapKeys = true }
// val dogmaEffect = json.parse(DogmaEffect.serializer(), jsonString)

package model

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

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

    val description: Description? = null,
    val disallowAutoRepeat: Boolean,

    @SerialName("dischargeAttributeID")
    val dischargeAttributeId: Long? = null,

    val displayName: DisplayName? = null,
    val distribution: Long? = null,

    @SerialName("durationAttributeID")
    val durationAttributeId: Long? = null,

    val effectCategory: Long,

    @SerialName("effectID")
    val effectId: Long,

    val effectName: String,
    val electronicChance: Boolean,

    @SerialName("falloffAttributeID")
    val falloffAttributeId: Long? = null,

    @SerialName("fittingUsageChanceAttributeID")
    val fittingUsageChanceAttributeId: Long? = null,

    val guid: String? = null,

    @SerialName("iconID")
    val iconId: Long? = null,

    val isAssistance: Boolean,
    val isOffensive: Boolean,
    val isWarpSafe: Boolean,
    val modifierInfo: List<ModifierInfo>? = null,

    @SerialName("npcActivationChanceAttributeID")
    val npcActivationChanceAttributeId: Long? = null,

    @SerialName("npcUsageChanceAttributeID")
    val npcUsageChanceAttributeId: Long? = null,

    val propulsionChance: Boolean,
    val published: Boolean,

    @SerialName("rangeAttributeID")
    val rangeAttributeId: Long? = null,

    val rangeChance: Boolean,

    @SerialName("resistanceAttributeID")
    val resistanceAttributeId: Long? = null,

    val sfxName: SfxName? = null,

    @SerialName("trackingSpeedAttributeID")
    val trackingSpeedAttributeId: Long? = 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 DisplayName (
    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 ModifierInfo (
    val domain: Domain,

    @SerialName("effectID")
    val effectId: Long? = null,

    val func: Func,

    @SerialName("groupID")
    val groupId: Long? = null,

    @SerialName("modifiedAttributeID")
    val modifiedAttributeId: Long? = null,

    @SerialName("modifyingAttributeID")
    val modifyingAttributeId: Long? = null,

    val operation: Long? = null,

    @SerialName("skillTypeID")
    val skillTypeId: Long? = null
)

@Serializable
enum class Domain(val value: String) {
    @SerialName("charID") CharId("charID"),
    @SerialName("itemID") ItemId("itemID"),
    @SerialName("otherID") OtherId("otherID"),
    @SerialName("shipID") ShipId("shipID"),
    @SerialName("structureID") StructureId("structureID"),
    @SerialName("target") Target("target"),
    @SerialName("targetID") TargetId("targetID");
}

@Serializable
enum class Func(val value: String) {
    @SerialName("EffectStopper") EffectStopper("EffectStopper"),
    @SerialName("ItemModifier") ItemModifier("ItemModifier"),
    @SerialName("LocationGroupModifier") LocationGroupModifier("LocationGroupModifier"),
    @SerialName("LocationModifier") LocationModifier("LocationModifier"),
    @SerialName("LocationRequiredSkillModifier") LocationRequiredSkillModifier("LocationRequiredSkillModifier"),
    @SerialName("OwnerRequiredSkillModifier") OwnerRequiredSkillModifier("OwnerRequiredSkillModifier");
}

@Serializable
enum class SfxName(val value: String) {
    @SerialName("None") None("None");
}
<?php

// This is a autogenerated file:DogmaEffect

class DogmaEffect {
    private int $key; // json:_key Required
    private ?Description $description; // json:description Optional
    private bool $disallowAutoRepeat; // json:disallowAutoRepeat Required
    private ?int $dischargeAttributeId; // json:dischargeAttributeID Optional
    private ?DisplayName $displayName; // json:displayName Optional
    private ?int $distribution; // json:distribution Optional
    private ?int $durationAttributeId; // json:durationAttributeID Optional
    private int $effectCategory; // json:effectCategory Required
    private int $effectId; // json:effectID Required
    private string $effectName; // json:effectName Required
    private bool $electronicChance; // json:electronicChance Required
    private ?int $falloffAttributeId; // json:falloffAttributeID Optional
    private ?int $fittingUsageChanceAttributeId; // json:fittingUsageChanceAttributeID Optional
    private ?string $guid; // json:guid Optional
    private ?int $iconId; // json:iconID Optional
    private bool $isAssistance; // json:isAssistance Required
    private bool $isOffensive; // json:isOffensive Required
    private bool $isWarpSafe; // json:isWarpSafe Required
    private ?array $modifierInfo; // json:modifierInfo Optional
    private ?int $npcActivationChanceAttributeId; // json:npcActivationChanceAttributeID Optional
    private ?int $npcUsageChanceAttributeId; // json:npcUsageChanceAttributeID Optional
    private bool $propulsionChance; // json:propulsionChance Required
    private bool $published; // json:published Required
    private ?int $rangeAttributeId; // json:rangeAttributeID Optional
    private bool $rangeChance; // json:rangeChance Required
    private ?int $resistanceAttributeId; // json:resistanceAttributeID Optional
    private ?SfxName $sfxName; // json:sfxName Optional
    private ?int $trackingSpeedAttributeId; // json:trackingSpeedAttributeID Optional

    /**
     * @param int $key
     * @param Description|null $description
     * @param bool $disallowAutoRepeat
     * @param int|null $dischargeAttributeId
     * @param DisplayName|null $displayName
     * @param int|null $distribution
     * @param int|null $durationAttributeId
     * @param int $effectCategory
     * @param int $effectId
     * @param string $effectName
     * @param bool $electronicChance
     * @param int|null $falloffAttributeId
     * @param int|null $fittingUsageChanceAttributeId
     * @param string|null $guid
     * @param int|null $iconId
     * @param bool $isAssistance
     * @param bool $isOffensive
     * @param bool $isWarpSafe
     * @param array|null $modifierInfo
     * @param int|null $npcActivationChanceAttributeId
     * @param int|null $npcUsageChanceAttributeId
     * @param bool $propulsionChance
     * @param bool $published
     * @param int|null $rangeAttributeId
     * @param bool $rangeChance
     * @param int|null $resistanceAttributeId
     * @param SfxName|null $sfxName
     * @param int|null $trackingSpeedAttributeId
     */
    public function __construct(int $key, ?Description $description, bool $disallowAutoRepeat, ?int $dischargeAttributeId, ?DisplayName $displayName, ?int $distribution, ?int $durationAttributeId, int $effectCategory, int $effectId, string $effectName, bool $electronicChance, ?int $falloffAttributeId, ?int $fittingUsageChanceAttributeId, ?string $guid, ?int $iconId, bool $isAssistance, bool $isOffensive, bool $isWarpSafe, ?array $modifierInfo, ?int $npcActivationChanceAttributeId, ?int $npcUsageChanceAttributeId, bool $propulsionChance, bool $published, ?int $rangeAttributeId, bool $rangeChance, ?int $resistanceAttributeId, ?SfxName $sfxName, ?int $trackingSpeedAttributeId) {
        $this->key = $key;
        $this->description = $description;
        $this->disallowAutoRepeat = $disallowAutoRepeat;
        $this->dischargeAttributeId = $dischargeAttributeId;
        $this->displayName = $displayName;
        $this->distribution = $distribution;
        $this->durationAttributeId = $durationAttributeId;
        $this->effectCategory = $effectCategory;
        $this->effectId = $effectId;
        $this->effectName = $effectName;
        $this->electronicChance = $electronicChance;
        $this->falloffAttributeId = $falloffAttributeId;
        $this->fittingUsageChanceAttributeId = $fittingUsageChanceAttributeId;
        $this->guid = $guid;
        $this->iconId = $iconId;
        $this->isAssistance = $isAssistance;
        $this->isOffensive = $isOffensive;
        $this->isWarpSafe = $isWarpSafe;
        $this->modifierInfo = $modifierInfo;
        $this->npcActivationChanceAttributeId = $npcActivationChanceAttributeId;
        $this->npcUsageChanceAttributeId = $npcUsageChanceAttributeId;
        $this->propulsionChance = $propulsionChance;
        $this->published = $published;
        $this->rangeAttributeId = $rangeAttributeId;
        $this->rangeChance = $rangeChance;
        $this->resistanceAttributeId = $resistanceAttributeId;
        $this->sfxName = $sfxName;
        $this->trackingSpeedAttributeId = $trackingSpeedAttributeId;
    }

    /**
     * @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 (DogmaEffect::validateKey($this->key))  {
            return $this->key; /*int*/
        }
        throw new Exception('never get to this DogmaEffect::key');
    }

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

    /**
     * @throws Exception
     * @return int
     */
    public function getKey(): int {
        if (DogmaEffect::validateKey($this->key))  {
            return $this->key;
        }
        throw new Exception('never get to getKey DogmaEffect::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 (DogmaEffect::validateDescription($this->description))  {
            if (!is_null($this->description)) {
                return $this->description->to(); /*class*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::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 (DogmaEffect::validateDescription($this->description))  {
            return $this->description;
        }
        throw new Exception('never get to getDescription DogmaEffect::description');
    }

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

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toDisallowAutoRepeat(): bool {
        if (DogmaEffect::validateDisallowAutoRepeat($this->disallowAutoRepeat))  {
            return $this->disallowAutoRepeat; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::disallowAutoRepeat');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getDisallowAutoRepeat(): bool {
        if (DogmaEffect::validateDisallowAutoRepeat($this->disallowAutoRepeat))  {
            return $this->disallowAutoRepeat;
        }
        throw new Exception('never get to getDisallowAutoRepeat DogmaEffect::disallowAutoRepeat');
    }

    /**
     * @return bool
     */
    public static function sampleDisallowAutoRepeat(): bool {
        return true; /*33:disallowAutoRepeat*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromDischargeAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toDischargeAttributeId(): ?int {
        if (DogmaEffect::validateDischargeAttributeId($this->dischargeAttributeId))  {
            if (!is_null($this->dischargeAttributeId)) {
                return $this->dischargeAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::dischargeAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateDischargeAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::dischargeAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getDischargeAttributeId(): ?int {
        if (DogmaEffect::validateDischargeAttributeId($this->dischargeAttributeId))  {
            return $this->dischargeAttributeId;
        }
        throw new Exception('never get to getDischargeAttributeId DogmaEffect::dischargeAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleDischargeAttributeId(): ?int {
        return 34; /*34:dischargeAttributeId*/
    }

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

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

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

    /**
     * @throws Exception
     * @return ?DisplayName
     */
    public function getDisplayName(): ?DisplayName {
        if (DogmaEffect::validateDisplayName($this->displayName))  {
            return $this->displayName;
        }
        throw new Exception('never get to getDisplayName DogmaEffect::displayName');
    }

    /**
     * @return ?DisplayName
     */
    public static function sampleDisplayName(): ?DisplayName {
        return DisplayName::sample(); /*35:displayName*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromDistribution(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toDistribution(): ?int {
        if (DogmaEffect::validateDistribution($this->distribution))  {
            if (!is_null($this->distribution)) {
                return $this->distribution; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::distribution');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateDistribution(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::distribution");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getDistribution(): ?int {
        if (DogmaEffect::validateDistribution($this->distribution))  {
            return $this->distribution;
        }
        throw new Exception('never get to getDistribution DogmaEffect::distribution');
    }

    /**
     * @return ?int
     */
    public static function sampleDistribution(): ?int {
        return 36; /*36:distribution*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromDurationAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toDurationAttributeId(): ?int {
        if (DogmaEffect::validateDurationAttributeId($this->durationAttributeId))  {
            if (!is_null($this->durationAttributeId)) {
                return $this->durationAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::durationAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateDurationAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::durationAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getDurationAttributeId(): ?int {
        if (DogmaEffect::validateDurationAttributeId($this->durationAttributeId))  {
            return $this->durationAttributeId;
        }
        throw new Exception('never get to getDurationAttributeId DogmaEffect::durationAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleDurationAttributeId(): ?int {
        return 37; /*37:durationAttributeId*/
    }

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

    /**
     * @throws Exception
     * @return int
     */
    public function toEffectCategory(): int {
        if (DogmaEffect::validateEffectCategory($this->effectCategory))  {
            return $this->effectCategory; /*int*/
        }
        throw new Exception('never get to this DogmaEffect::effectCategory');
    }

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

    /**
     * @throws Exception
     * @return int
     */
    public function getEffectCategory(): int {
        if (DogmaEffect::validateEffectCategory($this->effectCategory))  {
            return $this->effectCategory;
        }
        throw new Exception('never get to getEffectCategory DogmaEffect::effectCategory');
    }

    /**
     * @return int
     */
    public static function sampleEffectCategory(): int {
        return 38; /*38:effectCategory*/
    }

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

    /**
     * @throws Exception
     * @return int
     */
    public function toEffectId(): int {
        if (DogmaEffect::validateEffectId($this->effectId))  {
            return $this->effectId; /*int*/
        }
        throw new Exception('never get to this DogmaEffect::effectId');
    }

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

    /**
     * @throws Exception
     * @return int
     */
    public function getEffectId(): int {
        if (DogmaEffect::validateEffectId($this->effectId))  {
            return $this->effectId;
        }
        throw new Exception('never get to getEffectId DogmaEffect::effectId');
    }

    /**
     * @return int
     */
    public static function sampleEffectId(): int {
        return 39; /*39:effectId*/
    }

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

    /**
     * @throws Exception
     * @return string
     */
    public function toEffectName(): string {
        if (DogmaEffect::validateEffectName($this->effectName))  {
            return $this->effectName; /*string*/
        }
        throw new Exception('never get to this DogmaEffect::effectName');
    }

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

    /**
     * @throws Exception
     * @return string
     */
    public function getEffectName(): string {
        if (DogmaEffect::validateEffectName($this->effectName))  {
            return $this->effectName;
        }
        throw new Exception('never get to getEffectName DogmaEffect::effectName');
    }

    /**
     * @return string
     */
    public static function sampleEffectName(): string {
        return 'DogmaEffect::effectName::40'; /*40:effectName*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toElectronicChance(): bool {
        if (DogmaEffect::validateElectronicChance($this->electronicChance))  {
            return $this->electronicChance; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::electronicChance');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getElectronicChance(): bool {
        if (DogmaEffect::validateElectronicChance($this->electronicChance))  {
            return $this->electronicChance;
        }
        throw new Exception('never get to getElectronicChance DogmaEffect::electronicChance');
    }

    /**
     * @return bool
     */
    public static function sampleElectronicChance(): bool {
        return true; /*41:electronicChance*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromFalloffAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toFalloffAttributeId(): ?int {
        if (DogmaEffect::validateFalloffAttributeId($this->falloffAttributeId))  {
            if (!is_null($this->falloffAttributeId)) {
                return $this->falloffAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::falloffAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateFalloffAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::falloffAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getFalloffAttributeId(): ?int {
        if (DogmaEffect::validateFalloffAttributeId($this->falloffAttributeId))  {
            return $this->falloffAttributeId;
        }
        throw new Exception('never get to getFalloffAttributeId DogmaEffect::falloffAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleFalloffAttributeId(): ?int {
        return 42; /*42:falloffAttributeId*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromFittingUsageChanceAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toFittingUsageChanceAttributeId(): ?int {
        if (DogmaEffect::validateFittingUsageChanceAttributeId($this->fittingUsageChanceAttributeId))  {
            if (!is_null($this->fittingUsageChanceAttributeId)) {
                return $this->fittingUsageChanceAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::fittingUsageChanceAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateFittingUsageChanceAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::fittingUsageChanceAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getFittingUsageChanceAttributeId(): ?int {
        if (DogmaEffect::validateFittingUsageChanceAttributeId($this->fittingUsageChanceAttributeId))  {
            return $this->fittingUsageChanceAttributeId;
        }
        throw new Exception('never get to getFittingUsageChanceAttributeId DogmaEffect::fittingUsageChanceAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleFittingUsageChanceAttributeId(): ?int {
        return 43; /*43:fittingUsageChanceAttributeId*/
    }

    /**
     * @param ?string $value
     * @throws Exception
     * @return ?string
     */
    public static function fromGuid(?string $value): ?string {
        if (!is_null($value)) {
            return $value; /*string*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?string
     */
    public function toGuid(): ?string {
        if (DogmaEffect::validateGuid($this->guid))  {
            if (!is_null($this->guid)) {
                return $this->guid; /*string*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::guid');
    }

    /**
     * @param string|null
     * @return bool
     * @throws Exception
     */
    public static function validateGuid(?string $value): bool {
        if (!is_null($value)) {
            if (!is_string($value)) {
                throw new Exception("Attribute Error:DogmaEffect::guid");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?string
     */
    public function getGuid(): ?string {
        if (DogmaEffect::validateGuid($this->guid))  {
            return $this->guid;
        }
        throw new Exception('never get to getGuid DogmaEffect::guid');
    }

    /**
     * @return ?string
     */
    public static function sampleGuid(): ?string {
        return 'DogmaEffect::guid::44'; /*44:guid*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromIconId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toIconId(): ?int {
        if (DogmaEffect::validateIconId($this->iconId))  {
            if (!is_null($this->iconId)) {
                return $this->iconId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::iconId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateIconId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::iconId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getIconId(): ?int {
        if (DogmaEffect::validateIconId($this->iconId))  {
            return $this->iconId;
        }
        throw new Exception('never get to getIconId DogmaEffect::iconId');
    }

    /**
     * @return ?int
     */
    public static function sampleIconId(): ?int {
        return 45; /*45:iconId*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toIsAssistance(): bool {
        if (DogmaEffect::validateIsAssistance($this->isAssistance))  {
            return $this->isAssistance; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::isAssistance');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getIsAssistance(): bool {
        if (DogmaEffect::validateIsAssistance($this->isAssistance))  {
            return $this->isAssistance;
        }
        throw new Exception('never get to getIsAssistance DogmaEffect::isAssistance');
    }

    /**
     * @return bool
     */
    public static function sampleIsAssistance(): bool {
        return true; /*46:isAssistance*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toIsOffensive(): bool {
        if (DogmaEffect::validateIsOffensive($this->isOffensive))  {
            return $this->isOffensive; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::isOffensive');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getIsOffensive(): bool {
        if (DogmaEffect::validateIsOffensive($this->isOffensive))  {
            return $this->isOffensive;
        }
        throw new Exception('never get to getIsOffensive DogmaEffect::isOffensive');
    }

    /**
     * @return bool
     */
    public static function sampleIsOffensive(): bool {
        return true; /*47:isOffensive*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toIsWarpSafe(): bool {
        if (DogmaEffect::validateIsWarpSafe($this->isWarpSafe))  {
            return $this->isWarpSafe; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::isWarpSafe');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getIsWarpSafe(): bool {
        if (DogmaEffect::validateIsWarpSafe($this->isWarpSafe))  {
            return $this->isWarpSafe;
        }
        throw new Exception('never get to getIsWarpSafe DogmaEffect::isWarpSafe');
    }

    /**
     * @return bool
     */
    public static function sampleIsWarpSafe(): bool {
        return true; /*48:isWarpSafe*/
    }

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

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

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

    /**
     * @throws Exception
     * @return ?array
     */
    public function getModifierInfo(): ?array {
        if (DogmaEffect::validateModifierInfo($this->modifierInfo))  {
            return $this->modifierInfo;
        }
        throw new Exception('never get to getModifierInfo DogmaEffect::modifierInfo');
    }

    /**
     * @return ?array
     */
    public static function sampleModifierInfo(): ?array {
        return  array(
            ModifierInfo::sample() /*49:*/
        ); /* 49:modifierInfo*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromNpcActivationChanceAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toNpcActivationChanceAttributeId(): ?int {
        if (DogmaEffect::validateNpcActivationChanceAttributeId($this->npcActivationChanceAttributeId))  {
            if (!is_null($this->npcActivationChanceAttributeId)) {
                return $this->npcActivationChanceAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::npcActivationChanceAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateNpcActivationChanceAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::npcActivationChanceAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getNpcActivationChanceAttributeId(): ?int {
        if (DogmaEffect::validateNpcActivationChanceAttributeId($this->npcActivationChanceAttributeId))  {
            return $this->npcActivationChanceAttributeId;
        }
        throw new Exception('never get to getNpcActivationChanceAttributeId DogmaEffect::npcActivationChanceAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleNpcActivationChanceAttributeId(): ?int {
        return 50; /*50:npcActivationChanceAttributeId*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromNpcUsageChanceAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toNpcUsageChanceAttributeId(): ?int {
        if (DogmaEffect::validateNpcUsageChanceAttributeId($this->npcUsageChanceAttributeId))  {
            if (!is_null($this->npcUsageChanceAttributeId)) {
                return $this->npcUsageChanceAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::npcUsageChanceAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateNpcUsageChanceAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::npcUsageChanceAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getNpcUsageChanceAttributeId(): ?int {
        if (DogmaEffect::validateNpcUsageChanceAttributeId($this->npcUsageChanceAttributeId))  {
            return $this->npcUsageChanceAttributeId;
        }
        throw new Exception('never get to getNpcUsageChanceAttributeId DogmaEffect::npcUsageChanceAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleNpcUsageChanceAttributeId(): ?int {
        return 51; /*51:npcUsageChanceAttributeId*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toPropulsionChance(): bool {
        if (DogmaEffect::validatePropulsionChance($this->propulsionChance))  {
            return $this->propulsionChance; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::propulsionChance');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getPropulsionChance(): bool {
        if (DogmaEffect::validatePropulsionChance($this->propulsionChance))  {
            return $this->propulsionChance;
        }
        throw new Exception('never get to getPropulsionChance DogmaEffect::propulsionChance');
    }

    /**
     * @return bool
     */
    public static function samplePropulsionChance(): bool {
        return true; /*52:propulsionChance*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toPublished(): bool {
        if (DogmaEffect::validatePublished($this->published))  {
            return $this->published; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::published');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getPublished(): bool {
        if (DogmaEffect::validatePublished($this->published))  {
            return $this->published;
        }
        throw new Exception('never get to getPublished DogmaEffect::published');
    }

    /**
     * @return bool
     */
    public static function samplePublished(): bool {
        return true; /*53:published*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromRangeAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toRangeAttributeId(): ?int {
        if (DogmaEffect::validateRangeAttributeId($this->rangeAttributeId))  {
            if (!is_null($this->rangeAttributeId)) {
                return $this->rangeAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::rangeAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateRangeAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::rangeAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getRangeAttributeId(): ?int {
        if (DogmaEffect::validateRangeAttributeId($this->rangeAttributeId))  {
            return $this->rangeAttributeId;
        }
        throw new Exception('never get to getRangeAttributeId DogmaEffect::rangeAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleRangeAttributeId(): ?int {
        return 54; /*54:rangeAttributeId*/
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function toRangeChance(): bool {
        if (DogmaEffect::validateRangeChance($this->rangeChance))  {
            return $this->rangeChance; /*bool*/
        }
        throw new Exception('never get to this DogmaEffect::rangeChance');
    }

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

    /**
     * @throws Exception
     * @return bool
     */
    public function getRangeChance(): bool {
        if (DogmaEffect::validateRangeChance($this->rangeChance))  {
            return $this->rangeChance;
        }
        throw new Exception('never get to getRangeChance DogmaEffect::rangeChance');
    }

    /**
     * @return bool
     */
    public static function sampleRangeChance(): bool {
        return true; /*55:rangeChance*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromResistanceAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toResistanceAttributeId(): ?int {
        if (DogmaEffect::validateResistanceAttributeId($this->resistanceAttributeId))  {
            if (!is_null($this->resistanceAttributeId)) {
                return $this->resistanceAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::resistanceAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateResistanceAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::resistanceAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getResistanceAttributeId(): ?int {
        if (DogmaEffect::validateResistanceAttributeId($this->resistanceAttributeId))  {
            return $this->resistanceAttributeId;
        }
        throw new Exception('never get to getResistanceAttributeId DogmaEffect::resistanceAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleResistanceAttributeId(): ?int {
        return 56; /*56:resistanceAttributeId*/
    }

    /**
     * @param ?string $value
     * @throws Exception
     * @return ?SfxName
     */
    public static function fromSfxName(?string $value): ?SfxName {
        if (!is_null($value)) {
            return SfxName::from($value); /*enum*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?string
     */
    public function toSfxName(): ?string {
        if (DogmaEffect::validateSfxName($this->sfxName))  {
            if (!is_null($this->sfxName)) {
                return SfxName::to($this->sfxName); /*enum*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::sfxName');
    }

    /**
     * @param SfxName|null
     * @return bool
     * @throws Exception
     */
    public static function validateSfxName(?SfxName $value): bool {
        if (!is_null($value)) {
            SfxName::to($value);
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?SfxName
     */
    public function getSfxName(): ?SfxName {
        if (DogmaEffect::validateSfxName($this->sfxName))  {
            return $this->sfxName;
        }
        throw new Exception('never get to getSfxName DogmaEffect::sfxName');
    }

    /**
     * @return ?SfxName
     */
    public static function sampleSfxName(): ?SfxName {
        return SfxName::sample(); /*enum*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromTrackingSpeedAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toTrackingSpeedAttributeId(): ?int {
        if (DogmaEffect::validateTrackingSpeedAttributeId($this->trackingSpeedAttributeId))  {
            if (!is_null($this->trackingSpeedAttributeId)) {
                return $this->trackingSpeedAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this DogmaEffect::trackingSpeedAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateTrackingSpeedAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:DogmaEffect::trackingSpeedAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getTrackingSpeedAttributeId(): ?int {
        if (DogmaEffect::validateTrackingSpeedAttributeId($this->trackingSpeedAttributeId))  {
            return $this->trackingSpeedAttributeId;
        }
        throw new Exception('never get to getTrackingSpeedAttributeId DogmaEffect::trackingSpeedAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleTrackingSpeedAttributeId(): ?int {
        return 58; /*58:trackingSpeedAttributeId*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return DogmaEffect::validateKey($this->key)
        || DogmaEffect::validateDescription($this->description)
        || DogmaEffect::validateDisallowAutoRepeat($this->disallowAutoRepeat)
        || DogmaEffect::validateDischargeAttributeId($this->dischargeAttributeId)
        || DogmaEffect::validateDisplayName($this->displayName)
        || DogmaEffect::validateDistribution($this->distribution)
        || DogmaEffect::validateDurationAttributeId($this->durationAttributeId)
        || DogmaEffect::validateEffectCategory($this->effectCategory)
        || DogmaEffect::validateEffectId($this->effectId)
        || DogmaEffect::validateEffectName($this->effectName)
        || DogmaEffect::validateElectronicChance($this->electronicChance)
        || DogmaEffect::validateFalloffAttributeId($this->falloffAttributeId)
        || DogmaEffect::validateFittingUsageChanceAttributeId($this->fittingUsageChanceAttributeId)
        || DogmaEffect::validateGuid($this->guid)
        || DogmaEffect::validateIconId($this->iconId)
        || DogmaEffect::validateIsAssistance($this->isAssistance)
        || DogmaEffect::validateIsOffensive($this->isOffensive)
        || DogmaEffect::validateIsWarpSafe($this->isWarpSafe)
        || DogmaEffect::validateModifierInfo($this->modifierInfo)
        || DogmaEffect::validateNpcActivationChanceAttributeId($this->npcActivationChanceAttributeId)
        || DogmaEffect::validateNpcUsageChanceAttributeId($this->npcUsageChanceAttributeId)
        || DogmaEffect::validatePropulsionChance($this->propulsionChance)
        || DogmaEffect::validatePublished($this->published)
        || DogmaEffect::validateRangeAttributeId($this->rangeAttributeId)
        || DogmaEffect::validateRangeChance($this->rangeChance)
        || DogmaEffect::validateResistanceAttributeId($this->resistanceAttributeId)
        || DogmaEffect::validateSfxName($this->sfxName)
        || DogmaEffect::validateTrackingSpeedAttributeId($this->trackingSpeedAttributeId);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'_key'} = $this->toKey();
        $out->{'description'} = $this->toDescription();
        $out->{'disallowAutoRepeat'} = $this->toDisallowAutoRepeat();
        $out->{'dischargeAttributeID'} = $this->toDischargeAttributeId();
        $out->{'displayName'} = $this->toDisplayName();
        $out->{'distribution'} = $this->toDistribution();
        $out->{'durationAttributeID'} = $this->toDurationAttributeId();
        $out->{'effectCategory'} = $this->toEffectCategory();
        $out->{'effectID'} = $this->toEffectId();
        $out->{'effectName'} = $this->toEffectName();
        $out->{'electronicChance'} = $this->toElectronicChance();
        $out->{'falloffAttributeID'} = $this->toFalloffAttributeId();
        $out->{'fittingUsageChanceAttributeID'} = $this->toFittingUsageChanceAttributeId();
        $out->{'guid'} = $this->toGuid();
        $out->{'iconID'} = $this->toIconId();
        $out->{'isAssistance'} = $this->toIsAssistance();
        $out->{'isOffensive'} = $this->toIsOffensive();
        $out->{'isWarpSafe'} = $this->toIsWarpSafe();
        $out->{'modifierInfo'} = $this->toModifierInfo();
        $out->{'npcActivationChanceAttributeID'} = $this->toNpcActivationChanceAttributeId();
        $out->{'npcUsageChanceAttributeID'} = $this->toNpcUsageChanceAttributeId();
        $out->{'propulsionChance'} = $this->toPropulsionChance();
        $out->{'published'} = $this->toPublished();
        $out->{'rangeAttributeID'} = $this->toRangeAttributeId();
        $out->{'rangeChance'} = $this->toRangeChance();
        $out->{'resistanceAttributeID'} = $this->toResistanceAttributeId();
        $out->{'sfxName'} = $this->toSfxName();
        $out->{'trackingSpeedAttributeID'} = $this->toTrackingSpeedAttributeId();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return DogmaEffect
     * @throws Exception
     */
    public static function from(stdClass $obj): DogmaEffect {
        return new DogmaEffect(
         DogmaEffect::fromKey($obj->{'_key'})
        ,DogmaEffect::fromDescription($obj->{'description'})
        ,DogmaEffect::fromDisallowAutoRepeat($obj->{'disallowAutoRepeat'})
        ,DogmaEffect::fromDischargeAttributeId($obj->{'dischargeAttributeID'})
        ,DogmaEffect::fromDisplayName($obj->{'displayName'})
        ,DogmaEffect::fromDistribution($obj->{'distribution'})
        ,DogmaEffect::fromDurationAttributeId($obj->{'durationAttributeID'})
        ,DogmaEffect::fromEffectCategory($obj->{'effectCategory'})
        ,DogmaEffect::fromEffectId($obj->{'effectID'})
        ,DogmaEffect::fromEffectName($obj->{'effectName'})
        ,DogmaEffect::fromElectronicChance($obj->{'electronicChance'})
        ,DogmaEffect::fromFalloffAttributeId($obj->{'falloffAttributeID'})
        ,DogmaEffect::fromFittingUsageChanceAttributeId($obj->{'fittingUsageChanceAttributeID'})
        ,DogmaEffect::fromGuid($obj->{'guid'})
        ,DogmaEffect::fromIconId($obj->{'iconID'})
        ,DogmaEffect::fromIsAssistance($obj->{'isAssistance'})
        ,DogmaEffect::fromIsOffensive($obj->{'isOffensive'})
        ,DogmaEffect::fromIsWarpSafe($obj->{'isWarpSafe'})
        ,DogmaEffect::fromModifierInfo($obj->{'modifierInfo'})
        ,DogmaEffect::fromNpcActivationChanceAttributeId($obj->{'npcActivationChanceAttributeID'})
        ,DogmaEffect::fromNpcUsageChanceAttributeId($obj->{'npcUsageChanceAttributeID'})
        ,DogmaEffect::fromPropulsionChance($obj->{'propulsionChance'})
        ,DogmaEffect::fromPublished($obj->{'published'})
        ,DogmaEffect::fromRangeAttributeId($obj->{'rangeAttributeID'})
        ,DogmaEffect::fromRangeChance($obj->{'rangeChance'})
        ,DogmaEffect::fromResistanceAttributeId($obj->{'resistanceAttributeID'})
        ,DogmaEffect::fromSfxName($obj->{'sfxName'})
        ,DogmaEffect::fromTrackingSpeedAttributeId($obj->{'trackingSpeedAttributeID'})
        );
    }

    /**
     * @return DogmaEffect
     */
    public static function sample(): DogmaEffect {
        return new DogmaEffect(
         DogmaEffect::sampleKey()
        ,DogmaEffect::sampleDescription()
        ,DogmaEffect::sampleDisallowAutoRepeat()
        ,DogmaEffect::sampleDischargeAttributeId()
        ,DogmaEffect::sampleDisplayName()
        ,DogmaEffect::sampleDistribution()
        ,DogmaEffect::sampleDurationAttributeId()
        ,DogmaEffect::sampleEffectCategory()
        ,DogmaEffect::sampleEffectId()
        ,DogmaEffect::sampleEffectName()
        ,DogmaEffect::sampleElectronicChance()
        ,DogmaEffect::sampleFalloffAttributeId()
        ,DogmaEffect::sampleFittingUsageChanceAttributeId()
        ,DogmaEffect::sampleGuid()
        ,DogmaEffect::sampleIconId()
        ,DogmaEffect::sampleIsAssistance()
        ,DogmaEffect::sampleIsOffensive()
        ,DogmaEffect::sampleIsWarpSafe()
        ,DogmaEffect::sampleModifierInfo()
        ,DogmaEffect::sampleNpcActivationChanceAttributeId()
        ,DogmaEffect::sampleNpcUsageChanceAttributeId()
        ,DogmaEffect::samplePropulsionChance()
        ,DogmaEffect::samplePublished()
        ,DogmaEffect::sampleRangeAttributeId()
        ,DogmaEffect::sampleRangeChance()
        ,DogmaEffect::sampleResistanceAttributeId()
        ,DogmaEffect::sampleSfxName()
        ,DogmaEffect::sampleTrackingSpeedAttributeId()
        );
    }
}

// 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:DisplayName

class DisplayName {
    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 (DisplayName::validateDe($this->de))  {
            return $this->de; /*string*/
        }
        throw new Exception('never get to this DisplayName::de');
    }

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

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

    /**
     * @return string
     */
    public static function sampleDe(): string {
        return 'DisplayName::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 (DisplayName::validateEn($this->en))  {
            return $this->en; /*string*/
        }
        throw new Exception('never get to this DisplayName::en');
    }

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

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

    /**
     * @return string
     */
    public static function sampleEn(): string {
        return 'DisplayName::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 (DisplayName::validateEs($this->es))  {
            return $this->es; /*string*/
        }
        throw new Exception('never get to this DisplayName::es');
    }

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

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

    /**
     * @return string
     */
    public static function sampleEs(): string {
        return 'DisplayName::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 (DisplayName::validateFr($this->fr))  {
            return $this->fr; /*string*/
        }
        throw new Exception('never get to this DisplayName::fr');
    }

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

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

    /**
     * @return string
     */
    public static function sampleFr(): string {
        return 'DisplayName::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 (DisplayName::validateJa($this->ja))  {
            return $this->ja; /*string*/
        }
        throw new Exception('never get to this DisplayName::ja');
    }

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

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

    /**
     * @return string
     */
    public static function sampleJa(): string {
        return 'DisplayName::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 (DisplayName::validateKo($this->ko))  {
            return $this->ko; /*string*/
        }
        throw new Exception('never get to this DisplayName::ko');
    }

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

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

    /**
     * @return string
     */
    public static function sampleKo(): string {
        return 'DisplayName::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 (DisplayName::validateRu($this->ru))  {
            return $this->ru; /*string*/
        }
        throw new Exception('never get to this DisplayName::ru');
    }

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

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

    /**
     * @return string
     */
    public static function sampleRu(): string {
        return 'DisplayName::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 (DisplayName::validateZh($this->zh))  {
            return $this->zh; /*string*/
        }
        throw new Exception('never get to this DisplayName::zh');
    }

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

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

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

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return DisplayName::validateDe($this->de)
        || DisplayName::validateEn($this->en)
        || DisplayName::validateEs($this->es)
        || DisplayName::validateFr($this->fr)
        || DisplayName::validateJa($this->ja)
        || DisplayName::validateKo($this->ko)
        || DisplayName::validateRu($this->ru)
        || DisplayName::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 DisplayName
     * @throws Exception
     */
    public static function from(stdClass $obj): DisplayName {
        return new DisplayName(
         DisplayName::fromDe($obj->{'de'})
        ,DisplayName::fromEn($obj->{'en'})
        ,DisplayName::fromEs($obj->{'es'})
        ,DisplayName::fromFr($obj->{'fr'})
        ,DisplayName::fromJa($obj->{'ja'})
        ,DisplayName::fromKo($obj->{'ko'})
        ,DisplayName::fromRu($obj->{'ru'})
        ,DisplayName::fromZh($obj->{'zh'})
        );
    }

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

// This is a autogenerated file:ModifierInfo

class ModifierInfo {
    private Domain $domain; // json:domain Required
    private ?int $effectId; // json:effectID Optional
    private Func $func; // json:func Required
    private ?int $groupId; // json:groupID Optional
    private ?int $modifiedAttributeId; // json:modifiedAttributeID Optional
    private ?int $modifyingAttributeId; // json:modifyingAttributeID Optional
    private ?int $operation; // json:operation Optional
    private ?int $skillTypeId; // json:skillTypeID Optional

    /**
     * @param Domain $domain
     * @param int|null $effectId
     * @param Func $func
     * @param int|null $groupId
     * @param int|null $modifiedAttributeId
     * @param int|null $modifyingAttributeId
     * @param int|null $operation
     * @param int|null $skillTypeId
     */
    public function __construct(Domain $domain, ?int $effectId, Func $func, ?int $groupId, ?int $modifiedAttributeId, ?int $modifyingAttributeId, ?int $operation, ?int $skillTypeId) {
        $this->domain = $domain;
        $this->effectId = $effectId;
        $this->func = $func;
        $this->groupId = $groupId;
        $this->modifiedAttributeId = $modifiedAttributeId;
        $this->modifyingAttributeId = $modifyingAttributeId;
        $this->operation = $operation;
        $this->skillTypeId = $skillTypeId;
    }

    /**
     * @param string $value
     * @throws Exception
     * @return Domain
     */
    public static function fromDomain(string $value): Domain {
        return Domain::from($value); /*enum*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toDomain(): string {
        if (ModifierInfo::validateDomain($this->domain))  {
            return Domain::to($this->domain); /*enum*/
        }
        throw new Exception('never get to this ModifierInfo::domain');
    }

    /**
     * @param Domain
     * @return bool
     * @throws Exception
     */
    public static function validateDomain(Domain $value): bool {
        Domain::to($value);
        return true;
    }

    /**
     * @throws Exception
     * @return Domain
     */
    public function getDomain(): Domain {
        if (ModifierInfo::validateDomain($this->domain))  {
            return $this->domain;
        }
        throw new Exception('never get to getDomain ModifierInfo::domain');
    }

    /**
     * @return Domain
     */
    public static function sampleDomain(): Domain {
        return Domain::sample(); /*enum*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromEffectId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toEffectId(): ?int {
        if (ModifierInfo::validateEffectId($this->effectId))  {
            if (!is_null($this->effectId)) {
                return $this->effectId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ModifierInfo::effectId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateEffectId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:ModifierInfo::effectId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getEffectId(): ?int {
        if (ModifierInfo::validateEffectId($this->effectId))  {
            return $this->effectId;
        }
        throw new Exception('never get to getEffectId ModifierInfo::effectId');
    }

    /**
     * @return ?int
     */
    public static function sampleEffectId(): ?int {
        return 32; /*32:effectId*/
    }

    /**
     * @param string $value
     * @throws Exception
     * @return Func
     */
    public static function fromFunc(string $value): Func {
        return Func::from($value); /*enum*/
    }

    /**
     * @throws Exception
     * @return string
     */
    public function toFunc(): string {
        if (ModifierInfo::validateFunc($this->func))  {
            return Func::to($this->func); /*enum*/
        }
        throw new Exception('never get to this ModifierInfo::func');
    }

    /**
     * @param Func
     * @return bool
     * @throws Exception
     */
    public static function validateFunc(Func $value): bool {
        Func::to($value);
        return true;
    }

    /**
     * @throws Exception
     * @return Func
     */
    public function getFunc(): Func {
        if (ModifierInfo::validateFunc($this->func))  {
            return $this->func;
        }
        throw new Exception('never get to getFunc ModifierInfo::func');
    }

    /**
     * @return Func
     */
    public static function sampleFunc(): Func {
        return Func::sample(); /*enum*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromGroupId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toGroupId(): ?int {
        if (ModifierInfo::validateGroupId($this->groupId))  {
            if (!is_null($this->groupId)) {
                return $this->groupId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ModifierInfo::groupId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateGroupId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:ModifierInfo::groupId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getGroupId(): ?int {
        if (ModifierInfo::validateGroupId($this->groupId))  {
            return $this->groupId;
        }
        throw new Exception('never get to getGroupId ModifierInfo::groupId');
    }

    /**
     * @return ?int
     */
    public static function sampleGroupId(): ?int {
        return 34; /*34:groupId*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromModifiedAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toModifiedAttributeId(): ?int {
        if (ModifierInfo::validateModifiedAttributeId($this->modifiedAttributeId))  {
            if (!is_null($this->modifiedAttributeId)) {
                return $this->modifiedAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ModifierInfo::modifiedAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateModifiedAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:ModifierInfo::modifiedAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getModifiedAttributeId(): ?int {
        if (ModifierInfo::validateModifiedAttributeId($this->modifiedAttributeId))  {
            return $this->modifiedAttributeId;
        }
        throw new Exception('never get to getModifiedAttributeId ModifierInfo::modifiedAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleModifiedAttributeId(): ?int {
        return 35; /*35:modifiedAttributeId*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromModifyingAttributeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toModifyingAttributeId(): ?int {
        if (ModifierInfo::validateModifyingAttributeId($this->modifyingAttributeId))  {
            if (!is_null($this->modifyingAttributeId)) {
                return $this->modifyingAttributeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ModifierInfo::modifyingAttributeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateModifyingAttributeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:ModifierInfo::modifyingAttributeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getModifyingAttributeId(): ?int {
        if (ModifierInfo::validateModifyingAttributeId($this->modifyingAttributeId))  {
            return $this->modifyingAttributeId;
        }
        throw new Exception('never get to getModifyingAttributeId ModifierInfo::modifyingAttributeId');
    }

    /**
     * @return ?int
     */
    public static function sampleModifyingAttributeId(): ?int {
        return 36; /*36:modifyingAttributeId*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromOperation(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toOperation(): ?int {
        if (ModifierInfo::validateOperation($this->operation))  {
            if (!is_null($this->operation)) {
                return $this->operation; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ModifierInfo::operation');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateOperation(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:ModifierInfo::operation");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getOperation(): ?int {
        if (ModifierInfo::validateOperation($this->operation))  {
            return $this->operation;
        }
        throw new Exception('never get to getOperation ModifierInfo::operation');
    }

    /**
     * @return ?int
     */
    public static function sampleOperation(): ?int {
        return 37; /*37:operation*/
    }

    /**
     * @param ?int $value
     * @throws Exception
     * @return ?int
     */
    public static function fromSkillTypeId(?int $value): ?int {
        if (!is_null($value)) {
            return $value; /*int*/
        } else {
            return null;
        }
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function toSkillTypeId(): ?int {
        if (ModifierInfo::validateSkillTypeId($this->skillTypeId))  {
            if (!is_null($this->skillTypeId)) {
                return $this->skillTypeId; /*int*/
            } else {
                return  null;
            }
        }
        throw new Exception('never get to this ModifierInfo::skillTypeId');
    }

    /**
     * @param int|null
     * @return bool
     * @throws Exception
     */
    public static function validateSkillTypeId(?int $value): bool {
        if (!is_null($value)) {
            if (!is_integer($value)) {
                throw new Exception("Attribute Error:ModifierInfo::skillTypeId");
            }
        }
        return true;
    }

    /**
     * @throws Exception
     * @return ?int
     */
    public function getSkillTypeId(): ?int {
        if (ModifierInfo::validateSkillTypeId($this->skillTypeId))  {
            return $this->skillTypeId;
        }
        throw new Exception('never get to getSkillTypeId ModifierInfo::skillTypeId');
    }

    /**
     * @return ?int
     */
    public static function sampleSkillTypeId(): ?int {
        return 38; /*38:skillTypeId*/
    }

    /**
     * @throws Exception
     * @return bool
     */
    public function validate(): bool {
        return ModifierInfo::validateDomain($this->domain)
        || ModifierInfo::validateEffectId($this->effectId)
        || ModifierInfo::validateFunc($this->func)
        || ModifierInfo::validateGroupId($this->groupId)
        || ModifierInfo::validateModifiedAttributeId($this->modifiedAttributeId)
        || ModifierInfo::validateModifyingAttributeId($this->modifyingAttributeId)
        || ModifierInfo::validateOperation($this->operation)
        || ModifierInfo::validateSkillTypeId($this->skillTypeId);
    }

    /**
     * @return stdClass
     * @throws Exception
     */
    public function to(): stdClass  {
        $out = new stdClass();
        $out->{'domain'} = $this->toDomain();
        $out->{'effectID'} = $this->toEffectId();
        $out->{'func'} = $this->toFunc();
        $out->{'groupID'} = $this->toGroupId();
        $out->{'modifiedAttributeID'} = $this->toModifiedAttributeId();
        $out->{'modifyingAttributeID'} = $this->toModifyingAttributeId();
        $out->{'operation'} = $this->toOperation();
        $out->{'skillTypeID'} = $this->toSkillTypeId();
        return $out;
    }

    /**
     * @param stdClass $obj
     * @return ModifierInfo
     * @throws Exception
     */
    public static function from(stdClass $obj): ModifierInfo {
        return new ModifierInfo(
         ModifierInfo::fromDomain($obj->{'domain'})
        ,ModifierInfo::fromEffectId($obj->{'effectID'})
        ,ModifierInfo::fromFunc($obj->{'func'})
        ,ModifierInfo::fromGroupId($obj->{'groupID'})
        ,ModifierInfo::fromModifiedAttributeId($obj->{'modifiedAttributeID'})
        ,ModifierInfo::fromModifyingAttributeId($obj->{'modifyingAttributeID'})
        ,ModifierInfo::fromOperation($obj->{'operation'})
        ,ModifierInfo::fromSkillTypeId($obj->{'skillTypeID'})
        );
    }

    /**
     * @return ModifierInfo
     */
    public static function sample(): ModifierInfo {
        return new ModifierInfo(
         ModifierInfo::sampleDomain()
        ,ModifierInfo::sampleEffectId()
        ,ModifierInfo::sampleFunc()
        ,ModifierInfo::sampleGroupId()
        ,ModifierInfo::sampleModifiedAttributeId()
        ,ModifierInfo::sampleModifyingAttributeId()
        ,ModifierInfo::sampleOperation()
        ,ModifierInfo::sampleSkillTypeId()
        );
    }
}

// This is a autogenerated file:Domain

class Domain {
    public static Domain $CHAR_Id;
    public static Domain $ITEM_Id;
    public static Domain $OTHER_Id;
    public static Domain $SHIP_Id;
    public static Domain $STRUCTURE_Id;
    public static Domain $TARGET;
    public static Domain $TARGET_Id;
    public static function init() {
        Domain::$CHAR_Id = new Domain('charID');
        Domain::$ITEM_Id = new Domain('itemID');
        Domain::$OTHER_Id = new Domain('otherID');
        Domain::$SHIP_Id = new Domain('shipID');
        Domain::$STRUCTURE_Id = new Domain('structureID');
        Domain::$TARGET = new Domain('target');
        Domain::$TARGET_Id = new Domain('targetID');
    }
    private string $enum;
    public function __construct(string $enum) {
        $this->enum = $enum;
    }

    /**
     * @param Domain
     * @return string
     * @throws Exception
     */
    public static function to(Domain $obj): string {
        switch ($obj->enum) {
            case Domain::$CHAR_Id->enum: return 'charID';
            case Domain::$ITEM_Id->enum: return 'itemID';
            case Domain::$OTHER_Id->enum: return 'otherID';
            case Domain::$SHIP_Id->enum: return 'shipID';
            case Domain::$STRUCTURE_Id->enum: return 'structureID';
            case Domain::$TARGET->enum: return 'target';
            case Domain::$TARGET_Id->enum: return 'targetID';
        }
        throw new Exception('the give value is not an enum-value.');
    }

    /**
     * @param mixed
     * @return Domain
     * @throws Exception
     */
    public static function from($obj): Domain {
        switch ($obj) {
            case 'charID': return Domain::$CHAR_Id;
            case 'itemID': return Domain::$ITEM_Id;
            case 'otherID': return Domain::$OTHER_Id;
            case 'shipID': return Domain::$SHIP_Id;
            case 'structureID': return Domain::$STRUCTURE_Id;
            case 'target': return Domain::$TARGET;
            case 'targetID': return Domain::$TARGET_Id;
        }
        throw new Exception("Cannot deserialize Domain");
    }

    /**
     * @return Domain
     */
    public static function sample(): Domain {
        return Domain::$CHAR_Id;
    }
}
Domain::init();

// This is a autogenerated file:Func

class Func {
    public static Func $EFFECT_STOPPER;
    public static Func $ITEM_MODIFIER;
    public static Func $LOCATION_GROUP_MODIFIER;
    public static Func $LOCATION_MODIFIER;
    public static Func $LOCATION_REQUIRED_SKILL_MODIFIER;
    public static Func $OWNER_REQUIRED_SKILL_MODIFIER;
    public static function init() {
        Func::$EFFECT_STOPPER = new Func('EffectStopper');
        Func::$ITEM_MODIFIER = new Func('ItemModifier');
        Func::$LOCATION_GROUP_MODIFIER = new Func('LocationGroupModifier');
        Func::$LOCATION_MODIFIER = new Func('LocationModifier');
        Func::$LOCATION_REQUIRED_SKILL_MODIFIER = new Func('LocationRequiredSkillModifier');
        Func::$OWNER_REQUIRED_SKILL_MODIFIER = new Func('OwnerRequiredSkillModifier');
    }
    private string $enum;
    public function __construct(string $enum) {
        $this->enum = $enum;
    }

    /**
     * @param Func
     * @return string
     * @throws Exception
     */
    public static function to(Func $obj): string {
        switch ($obj->enum) {
            case Func::$EFFECT_STOPPER->enum: return 'EffectStopper';
            case Func::$ITEM_MODIFIER->enum: return 'ItemModifier';
            case Func::$LOCATION_GROUP_MODIFIER->enum: return 'LocationGroupModifier';
            case Func::$LOCATION_MODIFIER->enum: return 'LocationModifier';
            case Func::$LOCATION_REQUIRED_SKILL_MODIFIER->enum: return 'LocationRequiredSkillModifier';
            case Func::$OWNER_REQUIRED_SKILL_MODIFIER->enum: return 'OwnerRequiredSkillModifier';
        }
        throw new Exception('the give value is not an enum-value.');
    }

    /**
     * @param mixed
     * @return Func
     * @throws Exception
     */
    public static function from($obj): Func {
        switch ($obj) {
            case 'EffectStopper': return Func::$EFFECT_STOPPER;
            case 'ItemModifier': return Func::$ITEM_MODIFIER;
            case 'LocationGroupModifier': return Func::$LOCATION_GROUP_MODIFIER;
            case 'LocationModifier': return Func::$LOCATION_MODIFIER;
            case 'LocationRequiredSkillModifier': return Func::$LOCATION_REQUIRED_SKILL_MODIFIER;
            case 'OwnerRequiredSkillModifier': return Func::$OWNER_REQUIRED_SKILL_MODIFIER;
        }
        throw new Exception("Cannot deserialize Func");
    }

    /**
     * @return Func
     */
    public static function sample(): Func {
        return Func::$EFFECT_STOPPER;
    }
}
Func::init();

// This is a autogenerated file:SfxName

class SfxName {
    public static SfxName $NONE;
    public static function init() {
        SfxName::$NONE = new SfxName('None');
    }
    private string $enum;
    public function __construct(string $enum) {
        $this->enum = $enum;
    }

    /**
     * @param SfxName
     * @return string
     * @throws Exception
     */
    public static function to(SfxName $obj): string {
        switch ($obj->enum) {
            case SfxName::$NONE->enum: return 'None';
        }
        throw new Exception('the give value is not an enum-value.');
    }

    /**
     * @param mixed
     * @return SfxName
     * @throws Exception
     */
    public static function from($obj): SfxName {
        switch ($obj) {
            case 'None': return SfxName::$NONE;
        }
        throw new Exception("Cannot deserialize SfxName");
    }

    /**
     * @return SfxName
     */
    public static function sample(): SfxName {
        return SfxName::$NONE;
    }
}
SfxName::init();
from typing import Any, Optional, List, TypeVar, Type, Callable, cast
from enum import Enum


T = TypeVar("T")
EnumT = TypeVar("EnumT", bound=Enum)


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_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


def to_enum(c: Type[EnumT], x: Any) -> EnumT:
    assert isinstance(x, c)
    return x.value


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()


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 DisplayName:
    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) -> 'DisplayName':
        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 DisplayName(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 Domain(Enum):
    CHAR_ID = "charID"
    ITEM_ID = "itemID"
    OTHER_ID = "otherID"
    SHIP_ID = "shipID"
    STRUCTURE_ID = "structureID"
    TARGET = "target"
    TARGET_ID = "targetID"


class Func(Enum):
    EFFECT_STOPPER = "EffectStopper"
    ITEM_MODIFIER = "ItemModifier"
    LOCATION_GROUP_MODIFIER = "LocationGroupModifier"
    LOCATION_MODIFIER = "LocationModifier"
    LOCATION_REQUIRED_SKILL_MODIFIER = "LocationRequiredSkillModifier"
    OWNER_REQUIRED_SKILL_MODIFIER = "OwnerRequiredSkillModifier"


class ModifierInfo:
    domain: Domain
    effect_id: Optional[int]
    func: Func
    group_id: Optional[int]
    modified_attribute_id: Optional[int]
    modifying_attribute_id: Optional[int]
    operation: Optional[int]
    skill_type_id: Optional[int]

    def __init__(self, domain: Domain, effect_id: Optional[int], func: Func, group_id: Optional[int], modified_attribute_id: Optional[int], modifying_attribute_id: Optional[int], operation: Optional[int], skill_type_id: Optional[int]) -> None:
        self.domain = domain
        self.effect_id = effect_id
        self.func = func
        self.group_id = group_id
        self.modified_attribute_id = modified_attribute_id
        self.modifying_attribute_id = modifying_attribute_id
        self.operation = operation
        self.skill_type_id = skill_type_id

    @staticmethod
    def from_dict(obj: Any) -> 'ModifierInfo':
        assert isinstance(obj, dict)
        domain = Domain(obj.get("domain"))
        effect_id = from_union([from_int, from_none], obj.get("effectID"))
        func = Func(obj.get("func"))
        group_id = from_union([from_int, from_none], obj.get("groupID"))
        modified_attribute_id = from_union([from_int, from_none], obj.get("modifiedAttributeID"))
        modifying_attribute_id = from_union([from_int, from_none], obj.get("modifyingAttributeID"))
        operation = from_union([from_int, from_none], obj.get("operation"))
        skill_type_id = from_union([from_int, from_none], obj.get("skillTypeID"))
        return ModifierInfo(domain, effect_id, func, group_id, modified_attribute_id, modifying_attribute_id, operation, skill_type_id)

    def to_dict(self) -> dict:
        result: dict = {}
        result["domain"] = to_enum(Domain, self.domain)
        if self.effect_id is not None:
            result["effectID"] = from_union([from_int, from_none], self.effect_id)
        result["func"] = to_enum(Func, self.func)
        if self.group_id is not None:
            result["groupID"] = from_union([from_int, from_none], self.group_id)
        if self.modified_attribute_id is not None:
            result["modifiedAttributeID"] = from_union([from_int, from_none], self.modified_attribute_id)
        if self.modifying_attribute_id is not None:
            result["modifyingAttributeID"] = from_union([from_int, from_none], self.modifying_attribute_id)
        if self.operation is not None:
            result["operation"] = from_union([from_int, from_none], self.operation)
        if self.skill_type_id is not None:
            result["skillTypeID"] = from_union([from_int, from_none], self.skill_type_id)
        return result


class SfxName(Enum):
    NONE = "None"


class DogmaEffect:
    key: int
    description: Optional[Description]
    disallow_auto_repeat: bool
    discharge_attribute_id: Optional[int]
    display_name: Optional[DisplayName]
    distribution: Optional[int]
    duration_attribute_id: Optional[int]
    effect_category: int
    effect_id: int
    effect_name: str
    electronic_chance: bool
    falloff_attribute_id: Optional[int]
    fitting_usage_chance_attribute_id: Optional[int]
    guid: Optional[str]
    icon_id: Optional[int]
    is_assistance: bool
    is_offensive: bool
    is_warp_safe: bool
    modifier_info: Optional[List[ModifierInfo]]
    npc_activation_chance_attribute_id: Optional[int]
    npc_usage_chance_attribute_id: Optional[int]
    propulsion_chance: bool
    published: bool
    range_attribute_id: Optional[int]
    range_chance: bool
    resistance_attribute_id: Optional[int]
    sfx_name: Optional[SfxName]
    tracking_speed_attribute_id: Optional[int]

    def __init__(self, key: int, description: Optional[Description], disallow_auto_repeat: bool, discharge_attribute_id: Optional[int], display_name: Optional[DisplayName], distribution: Optional[int], duration_attribute_id: Optional[int], effect_category: int, effect_id: int, effect_name: str, electronic_chance: bool, falloff_attribute_id: Optional[int], fitting_usage_chance_attribute_id: Optional[int], guid: Optional[str], icon_id: Optional[int], is_assistance: bool, is_offensive: bool, is_warp_safe: bool, modifier_info: Optional[List[ModifierInfo]], npc_activation_chance_attribute_id: Optional[int], npc_usage_chance_attribute_id: Optional[int], propulsion_chance: bool, published: bool, range_attribute_id: Optional[int], range_chance: bool, resistance_attribute_id: Optional[int], sfx_name: Optional[SfxName], tracking_speed_attribute_id: Optional[int]) -> None:
        self.key = key
        self.description = description
        self.disallow_auto_repeat = disallow_auto_repeat
        self.discharge_attribute_id = discharge_attribute_id
        self.display_name = display_name
        self.distribution = distribution
        self.duration_attribute_id = duration_attribute_id
        self.effect_category = effect_category
        self.effect_id = effect_id
        self.effect_name = effect_name
        self.electronic_chance = electronic_chance
        self.falloff_attribute_id = falloff_attribute_id
        self.fitting_usage_chance_attribute_id = fitting_usage_chance_attribute_id
        self.guid = guid
        self.icon_id = icon_id
        self.is_assistance = is_assistance
        self.is_offensive = is_offensive
        self.is_warp_safe = is_warp_safe
        self.modifier_info = modifier_info
        self.npc_activation_chance_attribute_id = npc_activation_chance_attribute_id
        self.npc_usage_chance_attribute_id = npc_usage_chance_attribute_id
        self.propulsion_chance = propulsion_chance
        self.published = published
        self.range_attribute_id = range_attribute_id
        self.range_chance = range_chance
        self.resistance_attribute_id = resistance_attribute_id
        self.sfx_name = sfx_name
        self.tracking_speed_attribute_id = tracking_speed_attribute_id

    @staticmethod
    def from_dict(obj: Any) -> 'DogmaEffect':
        assert isinstance(obj, dict)
        key = from_int(obj.get("_key"))
        description = from_union([Description.from_dict, from_none], obj.get("description"))
        disallow_auto_repeat = from_bool(obj.get("disallowAutoRepeat"))
        discharge_attribute_id = from_union([from_int, from_none], obj.get("dischargeAttributeID"))
        display_name = from_union([DisplayName.from_dict, from_none], obj.get("displayName"))
        distribution = from_union([from_int, from_none], obj.get("distribution"))
        duration_attribute_id = from_union([from_int, from_none], obj.get("durationAttributeID"))
        effect_category = from_int(obj.get("effectCategory"))
        effect_id = from_int(obj.get("effectID"))
        effect_name = from_str(obj.get("effectName"))
        electronic_chance = from_bool(obj.get("electronicChance"))
        falloff_attribute_id = from_union([from_int, from_none], obj.get("falloffAttributeID"))
        fitting_usage_chance_attribute_id = from_union([from_int, from_none], obj.get("fittingUsageChanceAttributeID"))
        guid = from_union([from_str, from_none], obj.get("guid"))
        icon_id = from_union([from_int, from_none], obj.get("iconID"))
        is_assistance = from_bool(obj.get("isAssistance"))
        is_offensive = from_bool(obj.get("isOffensive"))
        is_warp_safe = from_bool(obj.get("isWarpSafe"))
        modifier_info = from_union([lambda x: from_list(ModifierInfo.from_dict, x), from_none], obj.get("modifierInfo"))
        npc_activation_chance_attribute_id = from_union([from_int, from_none], obj.get("npcActivationChanceAttributeID"))
        npc_usage_chance_attribute_id = from_union([from_int, from_none], obj.get("npcUsageChanceAttributeID"))
        propulsion_chance = from_bool(obj.get("propulsionChance"))
        published = from_bool(obj.get("published"))
        range_attribute_id = from_union([from_int, from_none], obj.get("rangeAttributeID"))
        range_chance = from_bool(obj.get("rangeChance"))
        resistance_attribute_id = from_union([from_int, from_none], obj.get("resistanceAttributeID"))
        sfx_name = from_union([SfxName, from_none], obj.get("sfxName"))
        tracking_speed_attribute_id = from_union([from_int, from_none], obj.get("trackingSpeedAttributeID"))
        return DogmaEffect(key, description, disallow_auto_repeat, discharge_attribute_id, display_name, distribution, duration_attribute_id, effect_category, effect_id, effect_name, electronic_chance, falloff_attribute_id, fitting_usage_chance_attribute_id, guid, icon_id, is_assistance, is_offensive, is_warp_safe, modifier_info, npc_activation_chance_attribute_id, npc_usage_chance_attribute_id, propulsion_chance, published, range_attribute_id, range_chance, resistance_attribute_id, sfx_name, tracking_speed_attribute_id)

    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)
        result["disallowAutoRepeat"] = from_bool(self.disallow_auto_repeat)
        if self.discharge_attribute_id is not None:
            result["dischargeAttributeID"] = from_union([from_int, from_none], self.discharge_attribute_id)
        if self.display_name is not None:
            result["displayName"] = from_union([lambda x: to_class(DisplayName, x), from_none], self.display_name)
        if self.distribution is not None:
            result["distribution"] = from_union([from_int, from_none], self.distribution)
        if self.duration_attribute_id is not None:
            result["durationAttributeID"] = from_union([from_int, from_none], self.duration_attribute_id)
        result["effectCategory"] = from_int(self.effect_category)
        result["effectID"] = from_int(self.effect_id)
        result["effectName"] = from_str(self.effect_name)
        result["electronicChance"] = from_bool(self.electronic_chance)
        if self.falloff_attribute_id is not None:
            result["falloffAttributeID"] = from_union([from_int, from_none], self.falloff_attribute_id)
        if self.fitting_usage_chance_attribute_id is not None:
            result["fittingUsageChanceAttributeID"] = from_union([from_int, from_none], self.fitting_usage_chance_attribute_id)
        if self.guid is not None:
            result["guid"] = from_union([from_str, from_none], self.guid)
        if self.icon_id is not None:
            result["iconID"] = from_union([from_int, from_none], self.icon_id)
        result["isAssistance"] = from_bool(self.is_assistance)
        result["isOffensive"] = from_bool(self.is_offensive)
        result["isWarpSafe"] = from_bool(self.is_warp_safe)
        if self.modifier_info is not None:
            result["modifierInfo"] = from_union([lambda x: from_list(lambda x: to_class(ModifierInfo, x), x), from_none], self.modifier_info)
        if self.npc_activation_chance_attribute_id is not None:
            result["npcActivationChanceAttributeID"] = from_union([from_int, from_none], self.npc_activation_chance_attribute_id)
        if self.npc_usage_chance_attribute_id is not None:
            result["npcUsageChanceAttributeID"] = from_union([from_int, from_none], self.npc_usage_chance_attribute_id)
        result["propulsionChance"] = from_bool(self.propulsion_chance)
        result["published"] = from_bool(self.published)
        if self.range_attribute_id is not None:
            result["rangeAttributeID"] = from_union([from_int, from_none], self.range_attribute_id)
        result["rangeChance"] = from_bool(self.range_chance)
        if self.resistance_attribute_id is not None:
            result["resistanceAttributeID"] = from_union([from_int, from_none], self.resistance_attribute_id)
        if self.sfx_name is not None:
            result["sfxName"] = from_union([lambda x: to_enum(SfxName, x), from_none], self.sfx_name)
        if self.tracking_speed_attribute_id is not None:
            result["trackingSpeedAttributeID"] = from_union([from_int, from_none], self.tracking_speed_attribute_id)
        return result


def dogma_effect_from_dict(s: Any) -> DogmaEffect:
    return DogmaEffect.from_dict(s)


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

export interface DogmaEffect {
    _key:                            number;
    description?:                    Description;
    disallowAutoRepeat:              boolean;
    dischargeAttributeID?:           number;
    displayName?:                    DisplayName;
    distribution?:                   number;
    durationAttributeID?:            number;
    effectCategory:                  number;
    effectID:                        number;
    effectName:                      string;
    electronicChance:                boolean;
    falloffAttributeID?:             number;
    fittingUsageChanceAttributeID?:  number;
    guid?:                           string;
    iconID?:                         number;
    isAssistance:                    boolean;
    isOffensive:                     boolean;
    isWarpSafe:                      boolean;
    modifierInfo?:                   ModifierInfo[];
    npcActivationChanceAttributeID?: number;
    npcUsageChanceAttributeID?:      number;
    propulsionChance:                boolean;
    published:                       boolean;
    rangeAttributeID?:               number;
    rangeChance:                     boolean;
    resistanceAttributeID?:          number;
    sfxName?:                        SfxName;
    trackingSpeedAttributeID?:       number;
    [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 DisplayName {
    de: string;
    en: string;
    es: string;
    fr: string;
    ja: string;
    ko: string;
    ru: string;
    zh: string;
    [property: string]: any;
}

export interface ModifierInfo {
    domain:                Domain;
    effectID?:             number;
    func:                  Func;
    groupID?:              number;
    modifiedAttributeID?:  number;
    modifyingAttributeID?: number;
    operation?:            number;
    skillTypeID?:          number;
    [property: string]: any;
}

export enum Domain {
    CharId = "charID",
    ItemId = "itemID",
    OtherId = "otherID",
    ShipId = "shipID",
    StructureId = "structureID",
    Target = "target",
    TargetId = "targetID",
}

export enum Func {
    EffectStopper = "EffectStopper",
    ItemModifier = "ItemModifier",
    LocationGroupModifier = "LocationGroupModifier",
    LocationModifier = "LocationModifier",
    LocationRequiredSkillModifier = "LocationRequiredSkillModifier",
    OwnerRequiredSkillModifier = "OwnerRequiredSkillModifier",
}

export enum SfxName {
    None = "None",
}

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

    public static dogmaEffectToJson(value: DogmaEffect): string {
        return JSON.stringify(uncast(value, r("DogmaEffect")), 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 = {
    "DogmaEffect": o([
        { json: "_key", js: "_key", typ: 0 },
        { json: "description", js: "description", typ: u(undefined, r("Description")) },
        { json: "disallowAutoRepeat", js: "disallowAutoRepeat", typ: true },
        { json: "dischargeAttributeID", js: "dischargeAttributeID", typ: u(undefined, 0) },
        { json: "displayName", js: "displayName", typ: u(undefined, r("DisplayName")) },
        { json: "distribution", js: "distribution", typ: u(undefined, 0) },
        { json: "durationAttributeID", js: "durationAttributeID", typ: u(undefined, 0) },
        { json: "effectCategory", js: "effectCategory", typ: 0 },
        { json: "effectID", js: "effectID", typ: 0 },
        { json: "effectName", js: "effectName", typ: "" },
        { json: "electronicChance", js: "electronicChance", typ: true },
        { json: "falloffAttributeID", js: "falloffAttributeID", typ: u(undefined, 0) },
        { json: "fittingUsageChanceAttributeID", js: "fittingUsageChanceAttributeID", typ: u(undefined, 0) },
        { json: "guid", js: "guid", typ: u(undefined, "") },
        { json: "iconID", js: "iconID", typ: u(undefined, 0) },
        { json: "isAssistance", js: "isAssistance", typ: true },
        { json: "isOffensive", js: "isOffensive", typ: true },
        { json: "isWarpSafe", js: "isWarpSafe", typ: true },
        { json: "modifierInfo", js: "modifierInfo", typ: u(undefined, a(r("ModifierInfo"))) },
        { json: "npcActivationChanceAttributeID", js: "npcActivationChanceAttributeID", typ: u(undefined, 0) },
        { json: "npcUsageChanceAttributeID", js: "npcUsageChanceAttributeID", typ: u(undefined, 0) },
        { json: "propulsionChance", js: "propulsionChance", typ: true },
        { json: "published", js: "published", typ: true },
        { json: "rangeAttributeID", js: "rangeAttributeID", typ: u(undefined, 0) },
        { json: "rangeChance", js: "rangeChance", typ: true },
        { json: "resistanceAttributeID", js: "resistanceAttributeID", typ: u(undefined, 0) },
        { json: "sfxName", js: "sfxName", typ: u(undefined, r("SfxName")) },
        { json: "trackingSpeedAttributeID", js: "trackingSpeedAttributeID", typ: u(undefined, 0) },
    ], "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"),
    "DisplayName": 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"),
    "ModifierInfo": o([
        { json: "domain", js: "domain", typ: r("Domain") },
        { json: "effectID", js: "effectID", typ: u(undefined, 0) },
        { json: "func", js: "func", typ: r("Func") },
        { json: "groupID", js: "groupID", typ: u(undefined, 0) },
        { json: "modifiedAttributeID", js: "modifiedAttributeID", typ: u(undefined, 0) },
        { json: "modifyingAttributeID", js: "modifyingAttributeID", typ: u(undefined, 0) },
        { json: "operation", js: "operation", typ: u(undefined, 0) },
        { json: "skillTypeID", js: "skillTypeID", typ: u(undefined, 0) },
    ], "any"),
    "Domain": [
        "charID",
        "itemID",
        "otherID",
        "shipID",
        "structureID",
        "target",
        "targetID",
    ],
    "Func": [
        "EffectStopper",
        "ItemModifier",
        "LocationGroupModifier",
        "LocationModifier",
        "LocationRequiredSkillModifier",
        "OwnerRequiredSkillModifier",
    ],
    "SfxName": [
        "None",
    ],
};