militaryCampaignObjectives.jsonl
Schema
_key(required): string-
annotations: objectrequiredEnlistmentWithFactionID(required): integer
Range: 500001 .. 500004-
restrictionTooltip(required): objectde(required): stringen(required): stringes(required): stringfr(required): stringja(required): stringko(required): stringru(required): stringzh(required): string
-
warning1(required): objectde(required): stringen(required): stringes(required): stringfr(required): stringja(required): stringko(required): stringru(required): stringzh(required): string
-
warning2: objectde(required): stringen(required): stringes(required): stringfr(required): stringja(required): stringko(required): stringru(required): stringzh(required): string
-
campaignID(required): string careerPath(required): stringcontentTags(required): array of string
Type:string-
contributionMethodConfiguration(required): objectname(required): enum
Enum values:CompleteAgentMission,HackSomething,DamageShip,CaptureDefendFWComplex,MineOre,KillNPC,KillCapsuleer,Manufacture,RemoteRepairArmorOrShieldparameters(required): array of objectkey(required): stringmatcher(required): objectvalues(required): array of objectvalueType(required): stringvalues: array of string
Type:string
-
issuer(required): objectcorporationID(required): integer
Range: 1000035 .. 1000182
-
maxProgressPerParticipant(required): integer
Range: 1 .. 200000 presentingCharacterID(required): integer
Range: 3003881 .. 3018998-
rewards(required): object-
isk(required): objectamountPerInterval(required): integer
Range: 1 .. 4800000-
issuer(required): objectcorporationID(required): integer
Range: 1000035 .. 1000182
-
progressInterval(required): integer
Range: 1 .. 1
-
lp(required): objectamountPerInterval(required): integer
Range: 30 .. 25000-
issuer(required): objectcorporationID(required): integer
Range: 1000035 .. 1000182
-
progressInterval(required): integer
Range: 1 .. 20000
-
standing(required): objectgainPercentPerInterval(required): number
Range: 0.025 .. 0.57-
issuer(required): objectfactionID(required): integer
Range: 500001 .. 500004
-
progressInterval(required): integer
Range: 1 .. 20000
-
-
subtitle(required): objectde(required): stringen(required): stringes(required): stringfr(required): stringja(required): stringko(required): stringru(required): stringzh(required): string
-
targetProgress(required): integer
Range: 420 .. 448875000 title(required): objectde(required): stringen(required): stringes(required): stringfr(required): stringja(required): stringko(required): stringru(required): stringzh(required): string
Code snippets
// <auto-generated />
//
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
//
// using QuickType;
//
// var militaryCampaignObjective = MilitaryCampaignObjective.FromJson(jsonString);
namespace QuickType
{
using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
public partial class MilitaryCampaignObjective
{
[JsonProperty("_key")]
[JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
public string Key { get; set; }
[JsonProperty("annotations", NullValueHandling = NullValueHandling.Ignore)]
public Annotations Annotations { get; set; }
[JsonProperty("campaignID")]
[JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
public string CampaignId { get; set; }
[JsonProperty("careerPath")]
[JsonConverter(typeof(MinMaxLengthCheckConverter13))]
public string CareerPath { get; set; }
[JsonProperty("contentTags")]
[JsonConverter(typeof(PurpleDecodeArrayConverter))]
public string[] ContentTags { get; set; }
[JsonProperty("contributionMethodConfiguration")]
public ContributionMethodConfiguration ContributionMethodConfiguration { get; set; }
[JsonProperty("issuer")]
public MilitaryCampaignObjectiveIssuer Issuer { get; set; }
[JsonProperty("maxProgressPerParticipant")]
public long MaxProgressPerParticipant { get; set; }
[JsonProperty("presentingCharacterID")]
public long PresentingCharacterId { get; set; }
[JsonProperty("rewards")]
public Rewards Rewards { get; set; }
[JsonProperty("subtitle")]
public Subtitle Subtitle { get; set; }
[JsonProperty("targetProgress")]
public long TargetProgress { get; set; }
[JsonProperty("title")]
public Title Title { get; set; }
}
public partial class Annotations
{
[JsonProperty("requiredEnlistmentWithFactionID")]
public long RequiredEnlistmentWithFactionId { get; set; }
[JsonProperty("restrictionTooltip")]
public RestrictionTooltip RestrictionTooltip { get; set; }
[JsonProperty("warning1")]
public Warning1 Warning1 { get; set; }
[JsonProperty("warning2", NullValueHandling = NullValueHandling.Ignore)]
public Warning2 Warning2 { get; set; }
}
public partial class RestrictionTooltip
{
[JsonProperty("de")]
[JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
public string De { get; set; }
[JsonProperty("en")]
[JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
public string En { get; set; }
[JsonProperty("es")]
[JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
public string Es { get; set; }
[JsonProperty("fr")]
[JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
public string Fr { get; set; }
[JsonProperty("ja")]
[JsonConverter(typeof(IndecentMinMaxLengthCheckConverter))]
public string Ja { get; set; }
[JsonProperty("ko")]
[JsonConverter(typeof(HilariousMinMaxLengthCheckConverter))]
public string Ko { get; set; }
[JsonProperty("ru")]
[JsonConverter(typeof(AmbitiousMinMaxLengthCheckConverter))]
public string Ru { get; set; }
[JsonProperty("zh")]
[JsonConverter(typeof(CunningMinMaxLengthCheckConverter))]
public string Zh { get; set; }
}
public partial class Warning1
{
[JsonProperty("de")]
[JsonConverter(typeof(MagentaMinMaxLengthCheckConverter))]
public string De { get; set; }
[JsonProperty("en")]
[JsonConverter(typeof(FriskyMinMaxLengthCheckConverter))]
public string En { get; set; }
[JsonProperty("es")]
[JsonConverter(typeof(MischievousMinMaxLengthCheckConverter))]
public string Es { get; set; }
[JsonProperty("fr")]
[JsonConverter(typeof(BraggadociousMinMaxLengthCheckConverter))]
public string Fr { get; set; }
[JsonProperty("ja")]
[JsonConverter(typeof(MinMaxLengthCheckConverter1))]
public string Ja { get; set; }
[JsonProperty("ko")]
[JsonConverter(typeof(MinMaxLengthCheckConverter2))]
public string Ko { get; set; }
[JsonProperty("ru")]
[JsonConverter(typeof(MinMaxLengthCheckConverter3))]
public string Ru { get; set; }
[JsonProperty("zh")]
[JsonConverter(typeof(MinMaxLengthCheckConverter4))]
public string Zh { get; set; }
}
public partial class Warning2
{
[JsonProperty("de")]
[JsonConverter(typeof(MinMaxLengthCheckConverter5))]
public string De { get; set; }
[JsonProperty("en")]
[JsonConverter(typeof(MinMaxLengthCheckConverter6))]
public string En { get; set; }
[JsonProperty("es")]
[JsonConverter(typeof(MinMaxLengthCheckConverter7))]
public string Es { get; set; }
[JsonProperty("fr")]
[JsonConverter(typeof(MinMaxLengthCheckConverter8))]
public string Fr { get; set; }
[JsonProperty("ja")]
[JsonConverter(typeof(MinMaxLengthCheckConverter9))]
public string Ja { get; set; }
[JsonProperty("ko")]
[JsonConverter(typeof(MinMaxLengthCheckConverter10))]
public string Ko { get; set; }
[JsonProperty("ru")]
[JsonConverter(typeof(MinMaxLengthCheckConverter11))]
public string Ru { get; set; }
[JsonProperty("zh")]
[JsonConverter(typeof(MinMaxLengthCheckConverter12))]
public string Zh { get; set; }
}
public partial class ContributionMethodConfiguration
{
[JsonProperty("name")]
public Name Name { get; set; }
[JsonProperty("parameters")]
public Parameter[] Parameters { get; set; }
}
public partial class Parameter
{
[JsonProperty("key")]
[JsonConverter(typeof(MinMaxLengthCheckConverter15))]
public string Key { get; set; }
[JsonProperty("matcher")]
public Matcher Matcher { get; set; }
}
public partial class Matcher
{
[JsonProperty("values")]
public Value[] Values { get; set; }
}
public partial class Value
{
[JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(FluffyDecodeArrayConverter))]
public string[] Values { get; set; }
[JsonProperty("valueType")]
[JsonConverter(typeof(MinMaxLengthCheckConverter16))]
public string ValueType { get; set; }
}
public partial class MilitaryCampaignObjectiveIssuer
{
[JsonProperty("corporationID")]
public long CorporationId { get; set; }
}
public partial class Rewards
{
[JsonProperty("isk")]
public Isk Isk { get; set; }
[JsonProperty("lp")]
public Lp Lp { get; set; }
[JsonProperty("standing")]
public Standing Standing { get; set; }
}
public partial class Isk
{
[JsonProperty("amountPerInterval")]
public long AmountPerInterval { get; set; }
[JsonProperty("issuer")]
public IskIssuer Issuer { get; set; }
[JsonProperty("progressInterval")]
public long ProgressInterval { get; set; }
}
public partial class IskIssuer
{
[JsonProperty("corporationID")]
public long CorporationId { get; set; }
}
public partial class Lp
{
[JsonProperty("amountPerInterval")]
public long AmountPerInterval { get; set; }
[JsonProperty("issuer")]
public LpIssuer Issuer { get; set; }
[JsonProperty("progressInterval")]
public long ProgressInterval { get; set; }
}
public partial class LpIssuer
{
[JsonProperty("corporationID")]
public long CorporationId { get; set; }
}
public partial class Standing
{
[JsonProperty("gainPercentPerInterval")]
[JsonConverter(typeof(MinMaxValueCheckConverter))]
public double GainPercentPerInterval { get; set; }
[JsonProperty("issuer")]
public StandingIssuer Issuer { get; set; }
[JsonProperty("progressInterval")]
public long ProgressInterval { get; set; }
}
public partial class StandingIssuer
{
[JsonProperty("factionID")]
public long FactionId { get; set; }
}
public partial class Subtitle
{
[JsonProperty("de")]
[JsonConverter(typeof(MinMaxLengthCheckConverter18))]
public string De { get; set; }
[JsonProperty("en")]
[JsonConverter(typeof(MinMaxLengthCheckConverter19))]
public string En { get; set; }
[JsonProperty("es")]
[JsonConverter(typeof(MinMaxLengthCheckConverter20))]
public string Es { get; set; }
[JsonProperty("fr")]
[JsonConverter(typeof(MinMaxLengthCheckConverter21))]
public string Fr { get; set; }
[JsonProperty("ja")]
[JsonConverter(typeof(MinMaxLengthCheckConverter22))]
public string Ja { get; set; }
[JsonProperty("ko")]
[JsonConverter(typeof(MinMaxLengthCheckConverter23))]
public string Ko { get; set; }
[JsonProperty("ru")]
[JsonConverter(typeof(MinMaxLengthCheckConverter24))]
public string Ru { get; set; }
[JsonProperty("zh")]
[JsonConverter(typeof(MinMaxLengthCheckConverter25))]
public string Zh { get; set; }
}
public partial class Title
{
[JsonProperty("de")]
[JsonConverter(typeof(MinMaxLengthCheckConverter26))]
public string De { get; set; }
[JsonProperty("en")]
[JsonConverter(typeof(MinMaxLengthCheckConverter27))]
public string En { get; set; }
[JsonProperty("es")]
[JsonConverter(typeof(MinMaxLengthCheckConverter28))]
public string Es { get; set; }
[JsonProperty("fr")]
[JsonConverter(typeof(MinMaxLengthCheckConverter29))]
public string Fr { get; set; }
[JsonProperty("ja")]
[JsonConverter(typeof(MinMaxLengthCheckConverter30))]
public string Ja { get; set; }
[JsonProperty("ko")]
[JsonConverter(typeof(MinMaxLengthCheckConverter31))]
public string Ko { get; set; }
[JsonProperty("ru")]
[JsonConverter(typeof(MinMaxLengthCheckConverter32))]
public string Ru { get; set; }
[JsonProperty("zh")]
[JsonConverter(typeof(MinMaxLengthCheckConverter33))]
public string Zh { get; set; }
}
public enum Name { CaptureDefendFwComplex, CompleteAgentMission, DamageShip, HackSomething, KillCapsuleer, KillNpc, Manufacture, MineOre, RemoteRepairArmorOrShield };
public partial class MilitaryCampaignObjective
{
public static MilitaryCampaignObjective FromJson(string json) => JsonConvert.DeserializeObject<MilitaryCampaignObjective>(json, QuickType.Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this MilitaryCampaignObjective 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 =
{
NameConverter.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 >= 36 && 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 >= 36 && value.Length <= 36)
{
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 >= 98 && value.Length <= 104)
{
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 >= 98 && value.Length <= 104)
{
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 >= 95 && value.Length <= 102)
{
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 >= 95 && value.Length <= 102)
{
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 >= 85 && value.Length <= 93)
{
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 >= 85 && value.Length <= 93)
{
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 >= 91 && value.Length <= 99)
{
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 >= 91 && value.Length <= 99)
{
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 >= 38 && value.Length <= 41)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 38 && value.Length <= 41)
{
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 >= 38 && value.Length <= 39)
{
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 >= 38 && value.Length <= 39)
{
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 >= 67 && value.Length <= 70)
{
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 >= 67 && value.Length <= 70)
{
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 >= 26 && value.Length <= 29)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 26 && value.Length <= 29)
{
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 >= 130 && value.Length <= 136)
{
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 >= 130 && value.Length <= 136)
{
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 >= 127 && value.Length <= 134)
{
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 >= 127 && value.Length <= 134)
{
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 >= 117 && value.Length <= 125)
{
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 >= 117 && value.Length <= 125)
{
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 >= 123 && value.Length <= 131)
{
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 >= 123 && value.Length <= 131)
{
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 >= 70 && value.Length <= 73)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 70 && value.Length <= 73)
{
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 >= 70 && value.Length <= 71)
{
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 >= 70 && value.Length <= 71)
{
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 >= 99 && value.Length <= 102)
{
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 >= 99 && value.Length <= 102)
{
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 >= 58 && 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 >= 58 && value.Length <= 61)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter4 Singleton = new MinMaxLengthCheckConverter4();
}
internal class MinMaxLengthCheckConverter5 : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
var value = serializer.Deserialize<string>(reader);
if (value.Length >= 190 && value.Length <= 190)
{
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 >= 190 && value.Length <= 190)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter5 Singleton = new MinMaxLengthCheckConverter5();
}
internal class MinMaxLengthCheckConverter6 : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
var value = serializer.Deserialize<string>(reader);
if (value.Length >= 151 && value.Length <= 151)
{
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 >= 151 && value.Length <= 151)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter6 Singleton = new MinMaxLengthCheckConverter6();
}
internal class MinMaxLengthCheckConverter7 : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
var value = serializer.Deserialize<string>(reader);
if (value.Length >= 175 && value.Length <= 175)
{
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 >= 175 && value.Length <= 175)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter7 Singleton = new MinMaxLengthCheckConverter7();
}
internal class MinMaxLengthCheckConverter8 : 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 >= 197 && value.Length <= 197)
{
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 >= 197 && value.Length <= 197)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter8 Singleton = new MinMaxLengthCheckConverter8();
}
internal class MinMaxLengthCheckConverter9 : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
var value = serializer.Deserialize<string>(reader);
if (value.Length >= 62 && value.Length <= 62)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 62 && value.Length <= 62)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter9 Singleton = new MinMaxLengthCheckConverter9();
}
internal class MinMaxLengthCheckConverter10 : 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 >= 81 && value.Length <= 81)
{
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 >= 81 && value.Length <= 81)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter10 Singleton = new MinMaxLengthCheckConverter10();
}
internal class MinMaxLengthCheckConverter11 : 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 >= 125 && value.Length <= 125)
{
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 >= 125 && value.Length <= 125)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter11 Singleton = new MinMaxLengthCheckConverter11();
}
internal class MinMaxLengthCheckConverter12 : 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 >= 45 && value.Length <= 45)
{
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 >= 45 && value.Length <= 45)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter12 Singleton = new MinMaxLengthCheckConverter12();
}
internal class MinMaxLengthCheckConverter13 : 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 <= 18)
{
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 <= 18)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter13 Singleton = new MinMaxLengthCheckConverter13();
}
internal class PurpleDecodeArrayConverter : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string[]);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
reader.Read();
var value = new List<string>();
while (reader.TokenType != JsonToken.EndArray)
{
var converter = MinMaxLengthCheckConverter14.Singleton;
var arrayItem = (string)converter.ReadJson(reader, typeof(string), null, serializer);
value.Add(arrayItem);
reader.Read();
}
return value.ToArray();
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string[])untypedValue;
writer.WriteStartArray();
foreach (var arrayItem in value)
{
var converter = MinMaxLengthCheckConverter14.Singleton;
converter.WriteJson(writer, arrayItem, serializer);
}
writer.WriteEndArray();
return;
}
public static readonly PurpleDecodeArrayConverter Singleton = new PurpleDecodeArrayConverter();
}
internal class MinMaxLengthCheckConverter14 : 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 >= 15 && 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 >= 15 && value.Length <= 30)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter14 Singleton = new MinMaxLengthCheckConverter14();
}
internal class NameConverter : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(Name) || t == typeof(Name?);
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 "CaptureDefendFWComplex":
return Name.CaptureDefendFwComplex;
case "CompleteAgentMission":
return Name.CompleteAgentMission;
case "DamageShip":
return Name.DamageShip;
case "HackSomething":
return Name.HackSomething;
case "KillCapsuleer":
return Name.KillCapsuleer;
case "KillNPC":
return Name.KillNpc;
case "Manufacture":
return Name.Manufacture;
case "MineOre":
return Name.MineOre;
case "RemoteRepairArmorOrShield":
return Name.RemoteRepairArmorOrShield;
}
throw new Exception("Cannot unmarshal type Name");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
if (untypedValue == null)
{
serializer.Serialize(writer, null);
return;
}
var value = (Name)untypedValue;
switch (value)
{
case Name.CaptureDefendFwComplex:
serializer.Serialize(writer, "CaptureDefendFWComplex");
return;
case Name.CompleteAgentMission:
serializer.Serialize(writer, "CompleteAgentMission");
return;
case Name.DamageShip:
serializer.Serialize(writer, "DamageShip");
return;
case Name.HackSomething:
serializer.Serialize(writer, "HackSomething");
return;
case Name.KillCapsuleer:
serializer.Serialize(writer, "KillCapsuleer");
return;
case Name.KillNpc:
serializer.Serialize(writer, "KillNPC");
return;
case Name.Manufacture:
serializer.Serialize(writer, "Manufacture");
return;
case Name.MineOre:
serializer.Serialize(writer, "MineOre");
return;
case Name.RemoteRepairArmorOrShield:
serializer.Serialize(writer, "RemoteRepairArmorOrShield");
return;
}
throw new Exception("Cannot marshal type Name");
}
public static readonly NameConverter Singleton = new NameConverter();
}
internal class MinMaxLengthCheckConverter15 : 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 >= 3 && value.Length <= 21)
{
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 >= 3 && value.Length <= 21)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter15 Singleton = new MinMaxLengthCheckConverter15();
}
internal class MinMaxLengthCheckConverter16 : 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 <= 14)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 6 && value.Length <= 14)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter16 Singleton = new MinMaxLengthCheckConverter16();
}
internal class FluffyDecodeArrayConverter : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string[]);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
reader.Read();
var value = new List<string>();
while (reader.TokenType != JsonToken.EndArray)
{
var converter = MinMaxLengthCheckConverter17.Singleton;
var arrayItem = (string)converter.ReadJson(reader, typeof(string), null, serializer);
value.Add(arrayItem);
reader.Read();
}
return value.ToArray();
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string[])untypedValue;
writer.WriteStartArray();
foreach (var arrayItem in value)
{
var converter = MinMaxLengthCheckConverter17.Singleton;
converter.WriteJson(writer, arrayItem, serializer);
}
writer.WriteEndArray();
return;
}
public static readonly FluffyDecodeArrayConverter Singleton = new FluffyDecodeArrayConverter();
}
internal class MinMaxLengthCheckConverter17 : 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 >= 1 && value.Length <= 8)
{
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 >= 1 && value.Length <= 8)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter17 Singleton = new MinMaxLengthCheckConverter17();
}
internal class MinMaxValueCheckConverter : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.Null) return null;
var value = serializer.Deserialize<double>(reader);
if (value >= 0.025 && value <= 0.57)
{
return value;
}
throw new Exception("Cannot unmarshal type double");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
if (untypedValue == null)
{
serializer.Serialize(writer, null);
return;
}
var value = (double)untypedValue;
if (value >= 0.025 && value <= 0.57)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type double");
}
public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
}
internal class MinMaxLengthCheckConverter18 : 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 >= 90 && value.Length <= 368)
{
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 >= 90 && value.Length <= 368)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter18 Singleton = new MinMaxLengthCheckConverter18();
}
internal class MinMaxLengthCheckConverter19 : 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 >= 75 && value.Length <= 216)
{
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 >= 75 && value.Length <= 216)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter19 Singleton = new MinMaxLengthCheckConverter19();
}
internal class MinMaxLengthCheckConverter20 : 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 >= 91 && value.Length <= 391)
{
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 >= 91 && value.Length <= 391)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter20 Singleton = new MinMaxLengthCheckConverter20();
}
internal class MinMaxLengthCheckConverter21 : 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 >= 92 && value.Length <= 354)
{
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 >= 92 && value.Length <= 354)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter21 Singleton = new MinMaxLengthCheckConverter21();
}
internal class MinMaxLengthCheckConverter22 : 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 >= 33 && value.Length <= 171)
{
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 >= 33 && value.Length <= 171)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter22 Singleton = new MinMaxLengthCheckConverter22();
}
internal class MinMaxLengthCheckConverter23 : 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 >= 36 && value.Length <= 159)
{
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 >= 36 && value.Length <= 159)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter23 Singleton = new MinMaxLengthCheckConverter23();
}
internal class MinMaxLengthCheckConverter24 : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
var value = serializer.Deserialize<string>(reader);
if (value.Length >= 73 && value.Length <= 295)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 73 && value.Length <= 295)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter24 Singleton = new MinMaxLengthCheckConverter24();
}
internal class MinMaxLengthCheckConverter25 : 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 >= 24 && 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 >= 24 && value.Length <= 105)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter25 Singleton = new MinMaxLengthCheckConverter25();
}
internal class MinMaxLengthCheckConverter26 : 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 >= 14 && value.Length <= 57)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 14 && value.Length <= 57)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter26 Singleton = new MinMaxLengthCheckConverter26();
}
internal class MinMaxLengthCheckConverter27 : 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 >= 11 && 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 >= 11 && value.Length <= 48)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter27 Singleton = new MinMaxLengthCheckConverter27();
}
internal class MinMaxLengthCheckConverter28 : 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 >= 14 && value.Length <= 84)
{
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 >= 14 && value.Length <= 84)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter28 Singleton = new MinMaxLengthCheckConverter28();
}
internal class MinMaxLengthCheckConverter29 : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(string);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
var value = serializer.Deserialize<string>(reader);
if (value.Length >= 18 && value.Length <= 63)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 18 && value.Length <= 63)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter29 Singleton = new MinMaxLengthCheckConverter29();
}
internal class MinMaxLengthCheckConverter30 : 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 <= 29)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
var value = (string)untypedValue;
if (value.Length >= 8 && value.Length <= 29)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter30 Singleton = new MinMaxLengthCheckConverter30();
}
internal class MinMaxLengthCheckConverter31 : 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 <= 33)
{
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 <= 33)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter31 Singleton = new MinMaxLengthCheckConverter31();
}
internal class MinMaxLengthCheckConverter32 : 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 >= 13 && value.Length <= 58)
{
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 >= 13 && value.Length <= 58)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter32 Singleton = new MinMaxLengthCheckConverter32();
}
internal class MinMaxLengthCheckConverter33 : 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 >= 4 && value.Length <= 20)
{
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 >= 4 && value.Length <= 20)
{
serializer.Serialize(writer, value);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly MinMaxLengthCheckConverter33 Singleton = new MinMaxLengthCheckConverter33();
}
}
// 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:
//
// militaryCampaignObjective, err := UnmarshalMilitaryCampaignObjective(bytes)
// bytes, err = militaryCampaignObjective.Marshal()
package model
import "encoding/json"
func UnmarshalMilitaryCampaignObjective(data []byte) (MilitaryCampaignObjective, error) {
var r MilitaryCampaignObjective
err := json.Unmarshal(data, &r)
return r, err
}
func (r *MilitaryCampaignObjective) Marshal() ([]byte, error) {
return json.Marshal(r)
}
type MilitaryCampaignObjective struct {
Key string `json:"_key"`
Annotations *Annotations `json:"annotations,omitempty"`
CampaignID string `json:"campaignID"`
CareerPath string `json:"careerPath"`
ContentTags []string `json:"contentTags"`
ContributionMethodConfiguration ContributionMethodConfiguration `json:"contributionMethodConfiguration"`
Issuer MilitaryCampaignObjectiveIssuer `json:"issuer"`
MaxProgressPerParticipant int64 `json:"maxProgressPerParticipant"`
PresentingCharacterID int64 `json:"presentingCharacterID"`
Rewards Rewards `json:"rewards"`
Subtitle Subtitle `json:"subtitle"`
TargetProgress int64 `json:"targetProgress"`
Title Title `json:"title"`
}
type Annotations struct {
RequiredEnlistmentWithFactionID int64 `json:"requiredEnlistmentWithFactionID"`
RestrictionTooltip RestrictionTooltip `json:"restrictionTooltip"`
Warning1 Warning1 `json:"warning1"`
Warning2 *Warning2 `json:"warning2,omitempty"`
}
type RestrictionTooltip 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 Warning1 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 Warning2 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 ContributionMethodConfiguration struct {
Name Name `json:"name"`
Parameters []Parameter `json:"parameters"`
}
type Parameter struct {
Key string `json:"key"`
Matcher Matcher `json:"matcher"`
}
type Matcher struct {
Values []Value `json:"values"`
}
type Value struct {
Values []string `json:"values,omitempty"`
ValueType string `json:"valueType"`
}
type MilitaryCampaignObjectiveIssuer struct {
CorporationID int64 `json:"corporationID"`
}
type Rewards struct {
Isk Isk `json:"isk"`
Lp Lp `json:"lp"`
Standing Standing `json:"standing"`
}
type Isk struct {
AmountPerInterval int64 `json:"amountPerInterval"`
Issuer IskIssuer `json:"issuer"`
ProgressInterval int64 `json:"progressInterval"`
}
type IskIssuer struct {
CorporationID int64 `json:"corporationID"`
}
type Lp struct {
AmountPerInterval int64 `json:"amountPerInterval"`
Issuer LpIssuer `json:"issuer"`
ProgressInterval int64 `json:"progressInterval"`
}
type LpIssuer struct {
CorporationID int64 `json:"corporationID"`
}
type Standing struct {
GainPercentPerInterval float64 `json:"gainPercentPerInterval"`
Issuer StandingIssuer `json:"issuer"`
ProgressInterval int64 `json:"progressInterval"`
}
type StandingIssuer struct {
FactionID int64 `json:"factionID"`
}
type Subtitle 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 Title 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 Name string
const (
CaptureDefendFWComplex Name = "CaptureDefendFWComplex"
CompleteAgentMission Name = "CompleteAgentMission"
DamageShip Name = "DamageShip"
HackSomething Name = "HackSomething"
KillCapsuleer Name = "KillCapsuleer"
KillNPC Name = "KillNPC"
Manufacture Name = "Manufacture"
MineOre Name = "MineOre"
RemoteRepairArmorOrShield Name = "RemoteRepairArmorOrShield"
)
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"_key":{"type":"string","minLength":36,"maxLength":36},"annotations":{"type":"object","properties":{"requiredEnlistmentWithFactionID":{"type":"integer","minimum":500001,"maximum":500004},"restrictionTooltip":{"type":"object","properties":{"de":{"type":"string","minLength":98,"maxLength":104},"en":{"type":"string","minLength":95,"maxLength":102},"es":{"type":"string","minLength":85,"maxLength":93},"fr":{"type":"string","minLength":91,"maxLength":99},"ja":{"type":"string","minLength":38,"maxLength":41},"ko":{"type":"string","minLength":38,"maxLength":39},"ru":{"type":"string","minLength":67,"maxLength":70},"zh":{"type":"string","minLength":26,"maxLength":29}},"required":["de","en","es","fr","ja","ko","ru","zh"]},"warning1":{"type":"object","properties":{"de":{"type":"string","minLength":130,"maxLength":136},"en":{"type":"string","minLength":127,"maxLength":134},"es":{"type":"string","minLength":117,"maxLength":125},"fr":{"type":"string","minLength":123,"maxLength":131},"ja":{"type":"string","minLength":70,"maxLength":73},"ko":{"type":"string","minLength":70,"maxLength":71},"ru":{"type":"string","minLength":99,"maxLength":102},"zh":{"type":"string","minLength":58,"maxLength":61}},"required":["de","en","es","fr","ja","ko","ru","zh"]},"warning2":{"type":"object","properties":{"de":{"type":"string","minLength":190,"maxLength":190},"en":{"type":"string","minLength":151,"maxLength":151},"es":{"type":"string","minLength":175,"maxLength":175},"fr":{"type":"string","minLength":197,"maxLength":197},"ja":{"type":"string","minLength":62,"maxLength":62},"ko":{"type":"string","minLength":81,"maxLength":81},"ru":{"type":"string","minLength":125,"maxLength":125},"zh":{"type":"string","minLength":45,"maxLength":45}},"required":["de","en","es","fr","ja","ko","ru","zh"]}},"required":["requiredEnlistmentWithFactionID","restrictionTooltip","warning1"]},"campaignID":{"type":"string","minLength":36,"maxLength":36},"careerPath":{"type":"string","minLength":8,"maxLength":18},"contentTags":{"type":"array","items":{"type":"string","minLength":15,"maxLength":30},"minItems":3,"maxItems":3},"contributionMethodConfiguration":{"type":"object","properties":{"name":{"type":"string","enum":["CompleteAgentMission","HackSomething","DamageShip","CaptureDefendFWComplex","MineOre","KillNPC","KillCapsuleer","Manufacture","RemoteRepairArmorOrShield"]},"parameters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":3,"maxLength":21},"matcher":{"type":"object","properties":{"values":{"type":"array","items":{"type":"object","properties":{"valueType":{"type":"string","minLength":6,"maxLength":14},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":8},"minItems":1,"maxItems":390}},"required":["valueType"]},"minItems":1,"maxItems":3}},"required":["values"]}},"required":["key","matcher"]},"minItems":1,"maxItems":4}},"required":["name","parameters"]},"issuer":{"type":"object","properties":{"corporationID":{"type":"integer","minimum":1000035,"maximum":1000182}},"required":["corporationID"]},"maxProgressPerParticipant":{"type":"integer","minimum":1,"maximum":200000},"presentingCharacterID":{"type":"integer","minimum":3003881,"maximum":3018998},"rewards":{"type":"object","properties":{"isk":{"type":"object","properties":{"amountPerInterval":{"type":"integer","minimum":1,"maximum":4800000},"issuer":{"type":"object","properties":{"corporationID":{"type":"integer","minimum":1000035,"maximum":1000182}},"required":["corporationID"]},"progressInterval":{"type":"integer","minimum":1,"maximum":1}},"required":["amountPerInterval","issuer","progressInterval"]},"lp":{"type":"object","properties":{"amountPerInterval":{"type":"integer","minimum":30,"maximum":25000},"issuer":{"type":"object","properties":{"corporationID":{"type":"integer","minimum":1000035,"maximum":1000182}},"required":["corporationID"]},"progressInterval":{"type":"integer","minimum":1,"maximum":20000}},"required":["amountPerInterval","issuer","progressInterval"]},"standing":{"type":"object","properties":{"gainPercentPerInterval":{"type":"number","minimum":0.025,"maximum":0.57},"issuer":{"type":"object","properties":{"factionID":{"type":"integer","minimum":500001,"maximum":500004}},"required":["factionID"]},"progressInterval":{"type":"integer","minimum":1,"maximum":20000}},"required":["gainPercentPerInterval","issuer","progressInterval"]}},"required":["isk","lp","standing"]},"subtitle":{"type":"object","properties":{"de":{"type":"string","minLength":90,"maxLength":368},"en":{"type":"string","minLength":75,"maxLength":216},"es":{"type":"string","minLength":91,"maxLength":391},"fr":{"type":"string","minLength":92,"maxLength":354},"ja":{"type":"string","minLength":33,"maxLength":171},"ko":{"type":"string","minLength":36,"maxLength":159},"ru":{"type":"string","minLength":73,"maxLength":295},"zh":{"type":"string","minLength":24,"maxLength":105}},"required":["de","en","es","fr","ja","ko","ru","zh"]},"targetProgress":{"type":"integer","minimum":420,"maximum":448875000},"title":{"type":"object","properties":{"de":{"type":"string","minLength":14,"maxLength":57},"en":{"type":"string","minLength":11,"maxLength":48},"es":{"type":"string","minLength":14,"maxLength":84},"fr":{"type":"string","minLength":18,"maxLength":63},"ja":{"type":"string","minLength":8,"maxLength":29},"ko":{"type":"string","minLength":7,"maxLength":33},"ru":{"type":"string","minLength":13,"maxLength":58},"zh":{"type":"string","minLength":4,"maxLength":20}},"required":["de","en","es","fr","ja","ko","ru","zh"]}},"required":["_key","campaignID","careerPath","contentTags","contributionMethodConfiguration","issuer","maxProgressPerParticipant","presentingCharacterID","rewards","subtitle","targetProgress","title"]}
// To parse the JSON, install kotlin's serialization plugin and do:
//
// val json = Json { allowStructuredMapKeys = true }
// val militaryCampaignObjective = json.parse(MilitaryCampaignObjective.serializer(), jsonString)
package model
import kotlinx.serialization.*
import kotlinx.serialization.json.*
import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.*
@Serializable
data class MilitaryCampaignObjective (
@SerialName("_key")
val key: String,
val annotations: Annotations? = null,
@SerialName("campaignID")
val campaignId: String,
val careerPath: String,
val contentTags: List<String>,
val contributionMethodConfiguration: ContributionMethodConfiguration,
val issuer: MilitaryCampaignObjectiveIssuer,
val maxProgressPerParticipant: Long,
@SerialName("presentingCharacterID")
val presentingCharacterId: Long,
val rewards: Rewards,
val subtitle: Subtitle,
val targetProgress: Long,
val title: Title
)
@Serializable
data class Annotations (
@SerialName("requiredEnlistmentWithFactionID")
val requiredEnlistmentWithFactionId: Long,
val restrictionTooltip: RestrictionTooltip,
val warning1: Warning1,
val warning2: Warning2? = null
)
@Serializable
data class RestrictionTooltip (
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 Warning1 (
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 Warning2 (
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 ContributionMethodConfiguration (
val name: Name,
val parameters: List<Parameter>
)
@Serializable
enum class Name(val value: String) {
@SerialName("CaptureDefendFWComplex") CaptureDefendFwComplex("CaptureDefendFWComplex"),
@SerialName("CompleteAgentMission") CompleteAgentMission("CompleteAgentMission"),
@SerialName("DamageShip") DamageShip("DamageShip"),
@SerialName("HackSomething") HackSomething("HackSomething"),
@SerialName("KillCapsuleer") KillCapsuleer("KillCapsuleer"),
@SerialName("KillNPC") KillNpc("KillNPC"),
@SerialName("Manufacture") Manufacture("Manufacture"),
@SerialName("MineOre") MineOre("MineOre"),
@SerialName("RemoteRepairArmorOrShield") RemoteRepairArmorOrShield("RemoteRepairArmorOrShield");
}
@Serializable
data class Parameter (
val key: String,
val matcher: Matcher
)
@Serializable
data class Matcher (
val values: List<Value>
)
@Serializable
data class Value (
val values: List<String>? = null,
val valueType: String
)
@Serializable
data class MilitaryCampaignObjectiveIssuer (
@SerialName("corporationID")
val corporationId: Long
)
@Serializable
data class Rewards (
val isk: Isk,
val lp: Lp,
val standing: Standing
)
@Serializable
data class Isk (
val amountPerInterval: Long,
val issuer: IskIssuer,
val progressInterval: Long
)
@Serializable
data class IskIssuer (
@SerialName("corporationID")
val corporationId: Long
)
@Serializable
data class Lp (
val amountPerInterval: Long,
val issuer: LpIssuer,
val progressInterval: Long
)
@Serializable
data class LpIssuer (
@SerialName("corporationID")
val corporationId: Long
)
@Serializable
data class Standing (
val gainPercentPerInterval: Double,
val issuer: StandingIssuer,
val progressInterval: Long
)
@Serializable
data class StandingIssuer (
@SerialName("factionID")
val factionId: Long
)
@Serializable
data class Subtitle (
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 Title (
val de: String,
val en: String,
val es: String,
val fr: String,
val ja: String,
val ko: String,
val ru: String,
val zh: String
)
<?php
// This is a autogenerated file:MilitaryCampaignObjective
class MilitaryCampaignObjective {
private string $key; // json:_key Required
private ?Annotations $annotations; // json:annotations Optional
private string $campaignId; // json:campaignID Required
private string $careerPath; // json:careerPath Required
private array $contentTags; // json:contentTags Required
private ContributionMethodConfiguration $contributionMethodConfiguration; // json:contributionMethodConfiguration Required
private MilitaryCampaignObjectiveIssuer $issuer; // json:issuer Required
private int $maxProgressPerParticipant; // json:maxProgressPerParticipant Required
private int $presentingCharacterId; // json:presentingCharacterID Required
private Rewards $rewards; // json:rewards Required
private Subtitle $subtitle; // json:subtitle Required
private int $targetProgress; // json:targetProgress Required
private Title $title; // json:title Required
/**
* @param string $key
* @param Annotations|null $annotations
* @param string $campaignId
* @param string $careerPath
* @param array $contentTags
* @param ContributionMethodConfiguration $contributionMethodConfiguration
* @param MilitaryCampaignObjectiveIssuer $issuer
* @param int $maxProgressPerParticipant
* @param int $presentingCharacterId
* @param Rewards $rewards
* @param Subtitle $subtitle
* @param int $targetProgress
* @param Title $title
*/
public function __construct(string $key, ?Annotations $annotations, string $campaignId, string $careerPath, array $contentTags, ContributionMethodConfiguration $contributionMethodConfiguration, MilitaryCampaignObjectiveIssuer $issuer, int $maxProgressPerParticipant, int $presentingCharacterId, Rewards $rewards, Subtitle $subtitle, int $targetProgress, Title $title) {
$this->key = $key;
$this->annotations = $annotations;
$this->campaignId = $campaignId;
$this->careerPath = $careerPath;
$this->contentTags = $contentTags;
$this->contributionMethodConfiguration = $contributionMethodConfiguration;
$this->issuer = $issuer;
$this->maxProgressPerParticipant = $maxProgressPerParticipant;
$this->presentingCharacterId = $presentingCharacterId;
$this->rewards = $rewards;
$this->subtitle = $subtitle;
$this->targetProgress = $targetProgress;
$this->title = $title;
}
/**
* @param string $value
* @throws Exception
* @return string
*/
public static function fromKey(string $value): string {
return $value; /*string*/
}
/**
* @throws Exception
* @return string
*/
public function toKey(): string {
if (MilitaryCampaignObjective::validateKey($this->key)) {
return $this->key; /*string*/
}
throw new Exception('never get to this MilitaryCampaignObjective::key');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKey(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::key");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKey(): string {
if (MilitaryCampaignObjective::validateKey($this->key)) {
return $this->key;
}
throw new Exception('never get to getKey MilitaryCampaignObjective::key');
}
/**
* @return string
*/
public static function sampleKey(): string {
return 'MilitaryCampaignObjective::key::31'; /*31:key*/
}
/**
* @param ?stdClass $value
* @throws Exception
* @return ?Annotations
*/
public static function fromAnnotations(?stdClass $value): ?Annotations {
if (!is_null($value)) {
return Annotations::from($value); /*class*/
} else {
return null;
}
}
/**
* @throws Exception
* @return ?stdClass
*/
public function toAnnotations(): ?stdClass {
if (MilitaryCampaignObjective::validateAnnotations($this->annotations)) {
if (!is_null($this->annotations)) {
return $this->annotations->to(); /*class*/
} else {
return null;
}
}
throw new Exception('never get to this MilitaryCampaignObjective::annotations');
}
/**
* @param Annotations|null
* @return bool
* @throws Exception
*/
public static function validateAnnotations(?Annotations $value): bool {
if (!is_null($value)) {
$value->validate();
}
return true;
}
/**
* @throws Exception
* @return ?Annotations
*/
public function getAnnotations(): ?Annotations {
if (MilitaryCampaignObjective::validateAnnotations($this->annotations)) {
return $this->annotations;
}
throw new Exception('never get to getAnnotations MilitaryCampaignObjective::annotations');
}
/**
* @return ?Annotations
*/
public static function sampleAnnotations(): ?Annotations {
return Annotations::sample(); /*32:annotations*/
}
/**
* @param string $value
* @throws Exception
* @return string
*/
public static function fromCampaignId(string $value): string {
return $value; /*string*/
}
/**
* @throws Exception
* @return string
*/
public function toCampaignId(): string {
if (MilitaryCampaignObjective::validateCampaignId($this->campaignId)) {
return $this->campaignId; /*string*/
}
throw new Exception('never get to this MilitaryCampaignObjective::campaignId');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateCampaignId(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::campaignId");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getCampaignId(): string {
if (MilitaryCampaignObjective::validateCampaignId($this->campaignId)) {
return $this->campaignId;
}
throw new Exception('never get to getCampaignId MilitaryCampaignObjective::campaignId');
}
/**
* @return string
*/
public static function sampleCampaignId(): string {
return 'MilitaryCampaignObjective::campaignId::33'; /*33:campaignId*/
}
/**
* @param string $value
* @throws Exception
* @return string
*/
public static function fromCareerPath(string $value): string {
return $value; /*string*/
}
/**
* @throws Exception
* @return string
*/
public function toCareerPath(): string {
if (MilitaryCampaignObjective::validateCareerPath($this->careerPath)) {
return $this->careerPath; /*string*/
}
throw new Exception('never get to this MilitaryCampaignObjective::careerPath');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateCareerPath(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::careerPath");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getCareerPath(): string {
if (MilitaryCampaignObjective::validateCareerPath($this->careerPath)) {
return $this->careerPath;
}
throw new Exception('never get to getCareerPath MilitaryCampaignObjective::careerPath');
}
/**
* @return string
*/
public static function sampleCareerPath(): string {
return 'MilitaryCampaignObjective::careerPath::34'; /*34:careerPath*/
}
/**
* @param array $value
* @throws Exception
* @return array
*/
public static function fromContentTags(array $value): array {
return array_map(function ($value) {
return $value; /*string*/
}, $value);
}
/**
* @throws Exception
* @return array
*/
public function toContentTags(): array {
if (MilitaryCampaignObjective::validateContentTags($this->contentTags)) {
return array_map(function ($value) {
return $value; /*string*/
}, $this->contentTags);
}
throw new Exception('never get to this MilitaryCampaignObjective::contentTags');
}
/**
* @param array
* @return bool
* @throws Exception
*/
public static function validateContentTags(array $value): bool {
if (!is_array($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::contentTags");
}
array_walk($value, function($value_v) {
if (!is_string($value_v)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::contentTags");
}
});
return true;
}
/**
* @throws Exception
* @return array
*/
public function getContentTags(): array {
if (MilitaryCampaignObjective::validateContentTags($this->contentTags)) {
return $this->contentTags;
}
throw new Exception('never get to getContentTags MilitaryCampaignObjective::contentTags');
}
/**
* @return array
*/
public static function sampleContentTags(): array {
return array(
'MilitaryCampaignObjective::::35' /*35:*/
); /* 35:contentTags*/
}
/**
* @param stdClass $value
* @throws Exception
* @return ContributionMethodConfiguration
*/
public static function fromContributionMethodConfiguration(stdClass $value): ContributionMethodConfiguration {
return ContributionMethodConfiguration::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toContributionMethodConfiguration(): stdClass {
if (MilitaryCampaignObjective::validateContributionMethodConfiguration($this->contributionMethodConfiguration)) {
return $this->contributionMethodConfiguration->to(); /*class*/
}
throw new Exception('never get to this MilitaryCampaignObjective::contributionMethodConfiguration');
}
/**
* @param ContributionMethodConfiguration
* @return bool
* @throws Exception
*/
public static function validateContributionMethodConfiguration(ContributionMethodConfiguration $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return ContributionMethodConfiguration
*/
public function getContributionMethodConfiguration(): ContributionMethodConfiguration {
if (MilitaryCampaignObjective::validateContributionMethodConfiguration($this->contributionMethodConfiguration)) {
return $this->contributionMethodConfiguration;
}
throw new Exception('never get to getContributionMethodConfiguration MilitaryCampaignObjective::contributionMethodConfiguration');
}
/**
* @return ContributionMethodConfiguration
*/
public static function sampleContributionMethodConfiguration(): ContributionMethodConfiguration {
return ContributionMethodConfiguration::sample(); /*36:contributionMethodConfiguration*/
}
/**
* @param stdClass $value
* @throws Exception
* @return MilitaryCampaignObjectiveIssuer
*/
public static function fromIssuer(stdClass $value): MilitaryCampaignObjectiveIssuer {
return MilitaryCampaignObjectiveIssuer::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toIssuer(): stdClass {
if (MilitaryCampaignObjective::validateIssuer($this->issuer)) {
return $this->issuer->to(); /*class*/
}
throw new Exception('never get to this MilitaryCampaignObjective::issuer');
}
/**
* @param MilitaryCampaignObjectiveIssuer
* @return bool
* @throws Exception
*/
public static function validateIssuer(MilitaryCampaignObjectiveIssuer $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return MilitaryCampaignObjectiveIssuer
*/
public function getIssuer(): MilitaryCampaignObjectiveIssuer {
if (MilitaryCampaignObjective::validateIssuer($this->issuer)) {
return $this->issuer;
}
throw new Exception('never get to getIssuer MilitaryCampaignObjective::issuer');
}
/**
* @return MilitaryCampaignObjectiveIssuer
*/
public static function sampleIssuer(): MilitaryCampaignObjectiveIssuer {
return MilitaryCampaignObjectiveIssuer::sample(); /*37:issuer*/
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromMaxProgressPerParticipant(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toMaxProgressPerParticipant(): int {
if (MilitaryCampaignObjective::validateMaxProgressPerParticipant($this->maxProgressPerParticipant)) {
return $this->maxProgressPerParticipant; /*int*/
}
throw new Exception('never get to this MilitaryCampaignObjective::maxProgressPerParticipant');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateMaxProgressPerParticipant(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::maxProgressPerParticipant");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getMaxProgressPerParticipant(): int {
if (MilitaryCampaignObjective::validateMaxProgressPerParticipant($this->maxProgressPerParticipant)) {
return $this->maxProgressPerParticipant;
}
throw new Exception('never get to getMaxProgressPerParticipant MilitaryCampaignObjective::maxProgressPerParticipant');
}
/**
* @return int
*/
public static function sampleMaxProgressPerParticipant(): int {
return 38; /*38:maxProgressPerParticipant*/
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromPresentingCharacterId(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toPresentingCharacterId(): int {
if (MilitaryCampaignObjective::validatePresentingCharacterId($this->presentingCharacterId)) {
return $this->presentingCharacterId; /*int*/
}
throw new Exception('never get to this MilitaryCampaignObjective::presentingCharacterId');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validatePresentingCharacterId(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::presentingCharacterId");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getPresentingCharacterId(): int {
if (MilitaryCampaignObjective::validatePresentingCharacterId($this->presentingCharacterId)) {
return $this->presentingCharacterId;
}
throw new Exception('never get to getPresentingCharacterId MilitaryCampaignObjective::presentingCharacterId');
}
/**
* @return int
*/
public static function samplePresentingCharacterId(): int {
return 39; /*39:presentingCharacterId*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Rewards
*/
public static function fromRewards(stdClass $value): Rewards {
return Rewards::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toRewards(): stdClass {
if (MilitaryCampaignObjective::validateRewards($this->rewards)) {
return $this->rewards->to(); /*class*/
}
throw new Exception('never get to this MilitaryCampaignObjective::rewards');
}
/**
* @param Rewards
* @return bool
* @throws Exception
*/
public static function validateRewards(Rewards $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Rewards
*/
public function getRewards(): Rewards {
if (MilitaryCampaignObjective::validateRewards($this->rewards)) {
return $this->rewards;
}
throw new Exception('never get to getRewards MilitaryCampaignObjective::rewards');
}
/**
* @return Rewards
*/
public static function sampleRewards(): Rewards {
return Rewards::sample(); /*40:rewards*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Subtitle
*/
public static function fromSubtitle(stdClass $value): Subtitle {
return Subtitle::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toSubtitle(): stdClass {
if (MilitaryCampaignObjective::validateSubtitle($this->subtitle)) {
return $this->subtitle->to(); /*class*/
}
throw new Exception('never get to this MilitaryCampaignObjective::subtitle');
}
/**
* @param Subtitle
* @return bool
* @throws Exception
*/
public static function validateSubtitle(Subtitle $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Subtitle
*/
public function getSubtitle(): Subtitle {
if (MilitaryCampaignObjective::validateSubtitle($this->subtitle)) {
return $this->subtitle;
}
throw new Exception('never get to getSubtitle MilitaryCampaignObjective::subtitle');
}
/**
* @return Subtitle
*/
public static function sampleSubtitle(): Subtitle {
return Subtitle::sample(); /*41:subtitle*/
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromTargetProgress(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toTargetProgress(): int {
if (MilitaryCampaignObjective::validateTargetProgress($this->targetProgress)) {
return $this->targetProgress; /*int*/
}
throw new Exception('never get to this MilitaryCampaignObjective::targetProgress');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateTargetProgress(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjective::targetProgress");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getTargetProgress(): int {
if (MilitaryCampaignObjective::validateTargetProgress($this->targetProgress)) {
return $this->targetProgress;
}
throw new Exception('never get to getTargetProgress MilitaryCampaignObjective::targetProgress');
}
/**
* @return int
*/
public static function sampleTargetProgress(): int {
return 42; /*42:targetProgress*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Title
*/
public static function fromTitle(stdClass $value): Title {
return Title::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toTitle(): stdClass {
if (MilitaryCampaignObjective::validateTitle($this->title)) {
return $this->title->to(); /*class*/
}
throw new Exception('never get to this MilitaryCampaignObjective::title');
}
/**
* @param Title
* @return bool
* @throws Exception
*/
public static function validateTitle(Title $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Title
*/
public function getTitle(): Title {
if (MilitaryCampaignObjective::validateTitle($this->title)) {
return $this->title;
}
throw new Exception('never get to getTitle MilitaryCampaignObjective::title');
}
/**
* @return Title
*/
public static function sampleTitle(): Title {
return Title::sample(); /*43:title*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return MilitaryCampaignObjective::validateKey($this->key)
|| MilitaryCampaignObjective::validateAnnotations($this->annotations)
|| MilitaryCampaignObjective::validateCampaignId($this->campaignId)
|| MilitaryCampaignObjective::validateCareerPath($this->careerPath)
|| MilitaryCampaignObjective::validateContentTags($this->contentTags)
|| MilitaryCampaignObjective::validateContributionMethodConfiguration($this->contributionMethodConfiguration)
|| MilitaryCampaignObjective::validateIssuer($this->issuer)
|| MilitaryCampaignObjective::validateMaxProgressPerParticipant($this->maxProgressPerParticipant)
|| MilitaryCampaignObjective::validatePresentingCharacterId($this->presentingCharacterId)
|| MilitaryCampaignObjective::validateRewards($this->rewards)
|| MilitaryCampaignObjective::validateSubtitle($this->subtitle)
|| MilitaryCampaignObjective::validateTargetProgress($this->targetProgress)
|| MilitaryCampaignObjective::validateTitle($this->title);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'_key'} = $this->toKey();
$out->{'annotations'} = $this->toAnnotations();
$out->{'campaignID'} = $this->toCampaignId();
$out->{'careerPath'} = $this->toCareerPath();
$out->{'contentTags'} = $this->toContentTags();
$out->{'contributionMethodConfiguration'} = $this->toContributionMethodConfiguration();
$out->{'issuer'} = $this->toIssuer();
$out->{'maxProgressPerParticipant'} = $this->toMaxProgressPerParticipant();
$out->{'presentingCharacterID'} = $this->toPresentingCharacterId();
$out->{'rewards'} = $this->toRewards();
$out->{'subtitle'} = $this->toSubtitle();
$out->{'targetProgress'} = $this->toTargetProgress();
$out->{'title'} = $this->toTitle();
return $out;
}
/**
* @param stdClass $obj
* @return MilitaryCampaignObjective
* @throws Exception
*/
public static function from(stdClass $obj): MilitaryCampaignObjective {
return new MilitaryCampaignObjective(
MilitaryCampaignObjective::fromKey($obj->{'_key'})
,MilitaryCampaignObjective::fromAnnotations($obj->{'annotations'})
,MilitaryCampaignObjective::fromCampaignId($obj->{'campaignID'})
,MilitaryCampaignObjective::fromCareerPath($obj->{'careerPath'})
,MilitaryCampaignObjective::fromContentTags($obj->{'contentTags'})
,MilitaryCampaignObjective::fromContributionMethodConfiguration($obj->{'contributionMethodConfiguration'})
,MilitaryCampaignObjective::fromIssuer($obj->{'issuer'})
,MilitaryCampaignObjective::fromMaxProgressPerParticipant($obj->{'maxProgressPerParticipant'})
,MilitaryCampaignObjective::fromPresentingCharacterId($obj->{'presentingCharacterID'})
,MilitaryCampaignObjective::fromRewards($obj->{'rewards'})
,MilitaryCampaignObjective::fromSubtitle($obj->{'subtitle'})
,MilitaryCampaignObjective::fromTargetProgress($obj->{'targetProgress'})
,MilitaryCampaignObjective::fromTitle($obj->{'title'})
);
}
/**
* @return MilitaryCampaignObjective
*/
public static function sample(): MilitaryCampaignObjective {
return new MilitaryCampaignObjective(
MilitaryCampaignObjective::sampleKey()
,MilitaryCampaignObjective::sampleAnnotations()
,MilitaryCampaignObjective::sampleCampaignId()
,MilitaryCampaignObjective::sampleCareerPath()
,MilitaryCampaignObjective::sampleContentTags()
,MilitaryCampaignObjective::sampleContributionMethodConfiguration()
,MilitaryCampaignObjective::sampleIssuer()
,MilitaryCampaignObjective::sampleMaxProgressPerParticipant()
,MilitaryCampaignObjective::samplePresentingCharacterId()
,MilitaryCampaignObjective::sampleRewards()
,MilitaryCampaignObjective::sampleSubtitle()
,MilitaryCampaignObjective::sampleTargetProgress()
,MilitaryCampaignObjective::sampleTitle()
);
}
}
// This is a autogenerated file:Annotations
class Annotations {
private int $requiredEnlistmentWithFactionId; // json:requiredEnlistmentWithFactionID Required
private RestrictionTooltip $restrictionTooltip; // json:restrictionTooltip Required
private Warning1 $warning1; // json:warning1 Required
private ?Warning2 $warning2; // json:warning2 Optional
/**
* @param int $requiredEnlistmentWithFactionId
* @param RestrictionTooltip $restrictionTooltip
* @param Warning1 $warning1
* @param Warning2|null $warning2
*/
public function __construct(int $requiredEnlistmentWithFactionId, RestrictionTooltip $restrictionTooltip, Warning1 $warning1, ?Warning2 $warning2) {
$this->requiredEnlistmentWithFactionId = $requiredEnlistmentWithFactionId;
$this->restrictionTooltip = $restrictionTooltip;
$this->warning1 = $warning1;
$this->warning2 = $warning2;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromRequiredEnlistmentWithFactionId(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toRequiredEnlistmentWithFactionId(): int {
if (Annotations::validateRequiredEnlistmentWithFactionId($this->requiredEnlistmentWithFactionId)) {
return $this->requiredEnlistmentWithFactionId; /*int*/
}
throw new Exception('never get to this Annotations::requiredEnlistmentWithFactionId');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateRequiredEnlistmentWithFactionId(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:Annotations::requiredEnlistmentWithFactionId");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getRequiredEnlistmentWithFactionId(): int {
if (Annotations::validateRequiredEnlistmentWithFactionId($this->requiredEnlistmentWithFactionId)) {
return $this->requiredEnlistmentWithFactionId;
}
throw new Exception('never get to getRequiredEnlistmentWithFactionId Annotations::requiredEnlistmentWithFactionId');
}
/**
* @return int
*/
public static function sampleRequiredEnlistmentWithFactionId(): int {
return 31; /*31:requiredEnlistmentWithFactionId*/
}
/**
* @param stdClass $value
* @throws Exception
* @return RestrictionTooltip
*/
public static function fromRestrictionTooltip(stdClass $value): RestrictionTooltip {
return RestrictionTooltip::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toRestrictionTooltip(): stdClass {
if (Annotations::validateRestrictionTooltip($this->restrictionTooltip)) {
return $this->restrictionTooltip->to(); /*class*/
}
throw new Exception('never get to this Annotations::restrictionTooltip');
}
/**
* @param RestrictionTooltip
* @return bool
* @throws Exception
*/
public static function validateRestrictionTooltip(RestrictionTooltip $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return RestrictionTooltip
*/
public function getRestrictionTooltip(): RestrictionTooltip {
if (Annotations::validateRestrictionTooltip($this->restrictionTooltip)) {
return $this->restrictionTooltip;
}
throw new Exception('never get to getRestrictionTooltip Annotations::restrictionTooltip');
}
/**
* @return RestrictionTooltip
*/
public static function sampleRestrictionTooltip(): RestrictionTooltip {
return RestrictionTooltip::sample(); /*32:restrictionTooltip*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Warning1
*/
public static function fromWarning1(stdClass $value): Warning1 {
return Warning1::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toWarning1(): stdClass {
if (Annotations::validateWarning1($this->warning1)) {
return $this->warning1->to(); /*class*/
}
throw new Exception('never get to this Annotations::warning1');
}
/**
* @param Warning1
* @return bool
* @throws Exception
*/
public static function validateWarning1(Warning1 $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Warning1
*/
public function getWarning1(): Warning1 {
if (Annotations::validateWarning1($this->warning1)) {
return $this->warning1;
}
throw new Exception('never get to getWarning1 Annotations::warning1');
}
/**
* @return Warning1
*/
public static function sampleWarning1(): Warning1 {
return Warning1::sample(); /*33:warning1*/
}
/**
* @param ?stdClass $value
* @throws Exception
* @return ?Warning2
*/
public static function fromWarning2(?stdClass $value): ?Warning2 {
if (!is_null($value)) {
return Warning2::from($value); /*class*/
} else {
return null;
}
}
/**
* @throws Exception
* @return ?stdClass
*/
public function toWarning2(): ?stdClass {
if (Annotations::validateWarning2($this->warning2)) {
if (!is_null($this->warning2)) {
return $this->warning2->to(); /*class*/
} else {
return null;
}
}
throw new Exception('never get to this Annotations::warning2');
}
/**
* @param Warning2|null
* @return bool
* @throws Exception
*/
public static function validateWarning2(?Warning2 $value): bool {
if (!is_null($value)) {
$value->validate();
}
return true;
}
/**
* @throws Exception
* @return ?Warning2
*/
public function getWarning2(): ?Warning2 {
if (Annotations::validateWarning2($this->warning2)) {
return $this->warning2;
}
throw new Exception('never get to getWarning2 Annotations::warning2');
}
/**
* @return ?Warning2
*/
public static function sampleWarning2(): ?Warning2 {
return Warning2::sample(); /*34:warning2*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Annotations::validateRequiredEnlistmentWithFactionId($this->requiredEnlistmentWithFactionId)
|| Annotations::validateRestrictionTooltip($this->restrictionTooltip)
|| Annotations::validateWarning1($this->warning1)
|| Annotations::validateWarning2($this->warning2);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'requiredEnlistmentWithFactionID'} = $this->toRequiredEnlistmentWithFactionId();
$out->{'restrictionTooltip'} = $this->toRestrictionTooltip();
$out->{'warning1'} = $this->toWarning1();
$out->{'warning2'} = $this->toWarning2();
return $out;
}
/**
* @param stdClass $obj
* @return Annotations
* @throws Exception
*/
public static function from(stdClass $obj): Annotations {
return new Annotations(
Annotations::fromRequiredEnlistmentWithFactionId($obj->{'requiredEnlistmentWithFactionID'})
,Annotations::fromRestrictionTooltip($obj->{'restrictionTooltip'})
,Annotations::fromWarning1($obj->{'warning1'})
,Annotations::fromWarning2($obj->{'warning2'})
);
}
/**
* @return Annotations
*/
public static function sample(): Annotations {
return new Annotations(
Annotations::sampleRequiredEnlistmentWithFactionId()
,Annotations::sampleRestrictionTooltip()
,Annotations::sampleWarning1()
,Annotations::sampleWarning2()
);
}
}
// This is a autogenerated file:RestrictionTooltip
class RestrictionTooltip {
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 (RestrictionTooltip::validateDe($this->de)) {
return $this->de; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::de');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateDe(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::de");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getDe(): string {
if (RestrictionTooltip::validateDe($this->de)) {
return $this->de;
}
throw new Exception('never get to getDe RestrictionTooltip::de');
}
/**
* @return string
*/
public static function sampleDe(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateEn($this->en)) {
return $this->en; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::en');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEn(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::en");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEn(): string {
if (RestrictionTooltip::validateEn($this->en)) {
return $this->en;
}
throw new Exception('never get to getEn RestrictionTooltip::en');
}
/**
* @return string
*/
public static function sampleEn(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateEs($this->es)) {
return $this->es; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::es');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEs(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::es");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEs(): string {
if (RestrictionTooltip::validateEs($this->es)) {
return $this->es;
}
throw new Exception('never get to getEs RestrictionTooltip::es');
}
/**
* @return string
*/
public static function sampleEs(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateFr($this->fr)) {
return $this->fr; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::fr');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateFr(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::fr");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getFr(): string {
if (RestrictionTooltip::validateFr($this->fr)) {
return $this->fr;
}
throw new Exception('never get to getFr RestrictionTooltip::fr');
}
/**
* @return string
*/
public static function sampleFr(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateJa($this->ja)) {
return $this->ja; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::ja');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateJa(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::ja");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getJa(): string {
if (RestrictionTooltip::validateJa($this->ja)) {
return $this->ja;
}
throw new Exception('never get to getJa RestrictionTooltip::ja');
}
/**
* @return string
*/
public static function sampleJa(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateKo($this->ko)) {
return $this->ko; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::ko');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKo(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::ko");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKo(): string {
if (RestrictionTooltip::validateKo($this->ko)) {
return $this->ko;
}
throw new Exception('never get to getKo RestrictionTooltip::ko');
}
/**
* @return string
*/
public static function sampleKo(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateRu($this->ru)) {
return $this->ru; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::ru');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateRu(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::ru");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getRu(): string {
if (RestrictionTooltip::validateRu($this->ru)) {
return $this->ru;
}
throw new Exception('never get to getRu RestrictionTooltip::ru');
}
/**
* @return string
*/
public static function sampleRu(): string {
return 'RestrictionTooltip::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 (RestrictionTooltip::validateZh($this->zh)) {
return $this->zh; /*string*/
}
throw new Exception('never get to this RestrictionTooltip::zh');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateZh(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:RestrictionTooltip::zh");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getZh(): string {
if (RestrictionTooltip::validateZh($this->zh)) {
return $this->zh;
}
throw new Exception('never get to getZh RestrictionTooltip::zh');
}
/**
* @return string
*/
public static function sampleZh(): string {
return 'RestrictionTooltip::zh::38'; /*38:zh*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return RestrictionTooltip::validateDe($this->de)
|| RestrictionTooltip::validateEn($this->en)
|| RestrictionTooltip::validateEs($this->es)
|| RestrictionTooltip::validateFr($this->fr)
|| RestrictionTooltip::validateJa($this->ja)
|| RestrictionTooltip::validateKo($this->ko)
|| RestrictionTooltip::validateRu($this->ru)
|| RestrictionTooltip::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 RestrictionTooltip
* @throws Exception
*/
public static function from(stdClass $obj): RestrictionTooltip {
return new RestrictionTooltip(
RestrictionTooltip::fromDe($obj->{'de'})
,RestrictionTooltip::fromEn($obj->{'en'})
,RestrictionTooltip::fromEs($obj->{'es'})
,RestrictionTooltip::fromFr($obj->{'fr'})
,RestrictionTooltip::fromJa($obj->{'ja'})
,RestrictionTooltip::fromKo($obj->{'ko'})
,RestrictionTooltip::fromRu($obj->{'ru'})
,RestrictionTooltip::fromZh($obj->{'zh'})
);
}
/**
* @return RestrictionTooltip
*/
public static function sample(): RestrictionTooltip {
return new RestrictionTooltip(
RestrictionTooltip::sampleDe()
,RestrictionTooltip::sampleEn()
,RestrictionTooltip::sampleEs()
,RestrictionTooltip::sampleFr()
,RestrictionTooltip::sampleJa()
,RestrictionTooltip::sampleKo()
,RestrictionTooltip::sampleRu()
,RestrictionTooltip::sampleZh()
);
}
}
// This is a autogenerated file:Warning1
class Warning1 {
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 (Warning1::validateDe($this->de)) {
return $this->de; /*string*/
}
throw new Exception('never get to this Warning1::de');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateDe(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::de");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getDe(): string {
if (Warning1::validateDe($this->de)) {
return $this->de;
}
throw new Exception('never get to getDe Warning1::de');
}
/**
* @return string
*/
public static function sampleDe(): string {
return 'Warning1::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 (Warning1::validateEn($this->en)) {
return $this->en; /*string*/
}
throw new Exception('never get to this Warning1::en');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEn(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::en");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEn(): string {
if (Warning1::validateEn($this->en)) {
return $this->en;
}
throw new Exception('never get to getEn Warning1::en');
}
/**
* @return string
*/
public static function sampleEn(): string {
return 'Warning1::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 (Warning1::validateEs($this->es)) {
return $this->es; /*string*/
}
throw new Exception('never get to this Warning1::es');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEs(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::es");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEs(): string {
if (Warning1::validateEs($this->es)) {
return $this->es;
}
throw new Exception('never get to getEs Warning1::es');
}
/**
* @return string
*/
public static function sampleEs(): string {
return 'Warning1::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 (Warning1::validateFr($this->fr)) {
return $this->fr; /*string*/
}
throw new Exception('never get to this Warning1::fr');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateFr(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::fr");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getFr(): string {
if (Warning1::validateFr($this->fr)) {
return $this->fr;
}
throw new Exception('never get to getFr Warning1::fr');
}
/**
* @return string
*/
public static function sampleFr(): string {
return 'Warning1::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 (Warning1::validateJa($this->ja)) {
return $this->ja; /*string*/
}
throw new Exception('never get to this Warning1::ja');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateJa(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::ja");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getJa(): string {
if (Warning1::validateJa($this->ja)) {
return $this->ja;
}
throw new Exception('never get to getJa Warning1::ja');
}
/**
* @return string
*/
public static function sampleJa(): string {
return 'Warning1::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 (Warning1::validateKo($this->ko)) {
return $this->ko; /*string*/
}
throw new Exception('never get to this Warning1::ko');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKo(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::ko");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKo(): string {
if (Warning1::validateKo($this->ko)) {
return $this->ko;
}
throw new Exception('never get to getKo Warning1::ko');
}
/**
* @return string
*/
public static function sampleKo(): string {
return 'Warning1::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 (Warning1::validateRu($this->ru)) {
return $this->ru; /*string*/
}
throw new Exception('never get to this Warning1::ru');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateRu(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::ru");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getRu(): string {
if (Warning1::validateRu($this->ru)) {
return $this->ru;
}
throw new Exception('never get to getRu Warning1::ru');
}
/**
* @return string
*/
public static function sampleRu(): string {
return 'Warning1::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 (Warning1::validateZh($this->zh)) {
return $this->zh; /*string*/
}
throw new Exception('never get to this Warning1::zh');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateZh(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning1::zh");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getZh(): string {
if (Warning1::validateZh($this->zh)) {
return $this->zh;
}
throw new Exception('never get to getZh Warning1::zh');
}
/**
* @return string
*/
public static function sampleZh(): string {
return 'Warning1::zh::38'; /*38:zh*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Warning1::validateDe($this->de)
|| Warning1::validateEn($this->en)
|| Warning1::validateEs($this->es)
|| Warning1::validateFr($this->fr)
|| Warning1::validateJa($this->ja)
|| Warning1::validateKo($this->ko)
|| Warning1::validateRu($this->ru)
|| Warning1::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 Warning1
* @throws Exception
*/
public static function from(stdClass $obj): Warning1 {
return new Warning1(
Warning1::fromDe($obj->{'de'})
,Warning1::fromEn($obj->{'en'})
,Warning1::fromEs($obj->{'es'})
,Warning1::fromFr($obj->{'fr'})
,Warning1::fromJa($obj->{'ja'})
,Warning1::fromKo($obj->{'ko'})
,Warning1::fromRu($obj->{'ru'})
,Warning1::fromZh($obj->{'zh'})
);
}
/**
* @return Warning1
*/
public static function sample(): Warning1 {
return new Warning1(
Warning1::sampleDe()
,Warning1::sampleEn()
,Warning1::sampleEs()
,Warning1::sampleFr()
,Warning1::sampleJa()
,Warning1::sampleKo()
,Warning1::sampleRu()
,Warning1::sampleZh()
);
}
}
// This is a autogenerated file:Warning2
class Warning2 {
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 (Warning2::validateDe($this->de)) {
return $this->de; /*string*/
}
throw new Exception('never get to this Warning2::de');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateDe(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::de");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getDe(): string {
if (Warning2::validateDe($this->de)) {
return $this->de;
}
throw new Exception('never get to getDe Warning2::de');
}
/**
* @return string
*/
public static function sampleDe(): string {
return 'Warning2::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 (Warning2::validateEn($this->en)) {
return $this->en; /*string*/
}
throw new Exception('never get to this Warning2::en');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEn(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::en");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEn(): string {
if (Warning2::validateEn($this->en)) {
return $this->en;
}
throw new Exception('never get to getEn Warning2::en');
}
/**
* @return string
*/
public static function sampleEn(): string {
return 'Warning2::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 (Warning2::validateEs($this->es)) {
return $this->es; /*string*/
}
throw new Exception('never get to this Warning2::es');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEs(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::es");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEs(): string {
if (Warning2::validateEs($this->es)) {
return $this->es;
}
throw new Exception('never get to getEs Warning2::es');
}
/**
* @return string
*/
public static function sampleEs(): string {
return 'Warning2::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 (Warning2::validateFr($this->fr)) {
return $this->fr; /*string*/
}
throw new Exception('never get to this Warning2::fr');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateFr(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::fr");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getFr(): string {
if (Warning2::validateFr($this->fr)) {
return $this->fr;
}
throw new Exception('never get to getFr Warning2::fr');
}
/**
* @return string
*/
public static function sampleFr(): string {
return 'Warning2::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 (Warning2::validateJa($this->ja)) {
return $this->ja; /*string*/
}
throw new Exception('never get to this Warning2::ja');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateJa(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::ja");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getJa(): string {
if (Warning2::validateJa($this->ja)) {
return $this->ja;
}
throw new Exception('never get to getJa Warning2::ja');
}
/**
* @return string
*/
public static function sampleJa(): string {
return 'Warning2::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 (Warning2::validateKo($this->ko)) {
return $this->ko; /*string*/
}
throw new Exception('never get to this Warning2::ko');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKo(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::ko");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKo(): string {
if (Warning2::validateKo($this->ko)) {
return $this->ko;
}
throw new Exception('never get to getKo Warning2::ko');
}
/**
* @return string
*/
public static function sampleKo(): string {
return 'Warning2::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 (Warning2::validateRu($this->ru)) {
return $this->ru; /*string*/
}
throw new Exception('never get to this Warning2::ru');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateRu(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::ru");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getRu(): string {
if (Warning2::validateRu($this->ru)) {
return $this->ru;
}
throw new Exception('never get to getRu Warning2::ru');
}
/**
* @return string
*/
public static function sampleRu(): string {
return 'Warning2::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 (Warning2::validateZh($this->zh)) {
return $this->zh; /*string*/
}
throw new Exception('never get to this Warning2::zh');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateZh(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Warning2::zh");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getZh(): string {
if (Warning2::validateZh($this->zh)) {
return $this->zh;
}
throw new Exception('never get to getZh Warning2::zh');
}
/**
* @return string
*/
public static function sampleZh(): string {
return 'Warning2::zh::38'; /*38:zh*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Warning2::validateDe($this->de)
|| Warning2::validateEn($this->en)
|| Warning2::validateEs($this->es)
|| Warning2::validateFr($this->fr)
|| Warning2::validateJa($this->ja)
|| Warning2::validateKo($this->ko)
|| Warning2::validateRu($this->ru)
|| Warning2::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 Warning2
* @throws Exception
*/
public static function from(stdClass $obj): Warning2 {
return new Warning2(
Warning2::fromDe($obj->{'de'})
,Warning2::fromEn($obj->{'en'})
,Warning2::fromEs($obj->{'es'})
,Warning2::fromFr($obj->{'fr'})
,Warning2::fromJa($obj->{'ja'})
,Warning2::fromKo($obj->{'ko'})
,Warning2::fromRu($obj->{'ru'})
,Warning2::fromZh($obj->{'zh'})
);
}
/**
* @return Warning2
*/
public static function sample(): Warning2 {
return new Warning2(
Warning2::sampleDe()
,Warning2::sampleEn()
,Warning2::sampleEs()
,Warning2::sampleFr()
,Warning2::sampleJa()
,Warning2::sampleKo()
,Warning2::sampleRu()
,Warning2::sampleZh()
);
}
}
// This is a autogenerated file:ContributionMethodConfiguration
class ContributionMethodConfiguration {
private Name $name; // json:name Required
private array $parameters; // json:parameters Required
/**
* @param Name $name
* @param array $parameters
*/
public function __construct(Name $name, array $parameters) {
$this->name = $name;
$this->parameters = $parameters;
}
/**
* @param string $value
* @throws Exception
* @return Name
*/
public static function fromName(string $value): Name {
return Name::from($value); /*enum*/
}
/**
* @throws Exception
* @return string
*/
public function toName(): string {
if (ContributionMethodConfiguration::validateName($this->name)) {
return Name::to($this->name); /*enum*/
}
throw new Exception('never get to this ContributionMethodConfiguration::name');
}
/**
* @param Name
* @return bool
* @throws Exception
*/
public static function validateName(Name $value): bool {
Name::to($value);
return true;
}
/**
* @throws Exception
* @return Name
*/
public function getName(): Name {
if (ContributionMethodConfiguration::validateName($this->name)) {
return $this->name;
}
throw new Exception('never get to getName ContributionMethodConfiguration::name');
}
/**
* @return Name
*/
public static function sampleName(): Name {
return Name::sample(); /*enum*/
}
/**
* @param array $value
* @throws Exception
* @return array
*/
public static function fromParameters(array $value): array {
return array_map(function ($value) {
return Parameter::from($value); /*class*/
}, $value);
}
/**
* @throws Exception
* @return array
*/
public function toParameters(): array {
if (ContributionMethodConfiguration::validateParameters($this->parameters)) {
return array_map(function ($value) {
return $value->to(); /*class*/
}, $this->parameters);
}
throw new Exception('never get to this ContributionMethodConfiguration::parameters');
}
/**
* @param array
* @return bool
* @throws Exception
*/
public static function validateParameters(array $value): bool {
if (!is_array($value)) {
throw new Exception("Attribute Error:ContributionMethodConfiguration::parameters");
}
array_walk($value, function($value_v) {
$value_v->validate();
});
return true;
}
/**
* @throws Exception
* @return array
*/
public function getParameters(): array {
if (ContributionMethodConfiguration::validateParameters($this->parameters)) {
return $this->parameters;
}
throw new Exception('never get to getParameters ContributionMethodConfiguration::parameters');
}
/**
* @return array
*/
public static function sampleParameters(): array {
return array(
Parameter::sample() /*32:*/
); /* 32:parameters*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return ContributionMethodConfiguration::validateName($this->name)
|| ContributionMethodConfiguration::validateParameters($this->parameters);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'name'} = $this->toName();
$out->{'parameters'} = $this->toParameters();
return $out;
}
/**
* @param stdClass $obj
* @return ContributionMethodConfiguration
* @throws Exception
*/
public static function from(stdClass $obj): ContributionMethodConfiguration {
return new ContributionMethodConfiguration(
ContributionMethodConfiguration::fromName($obj->{'name'})
,ContributionMethodConfiguration::fromParameters($obj->{'parameters'})
);
}
/**
* @return ContributionMethodConfiguration
*/
public static function sample(): ContributionMethodConfiguration {
return new ContributionMethodConfiguration(
ContributionMethodConfiguration::sampleName()
,ContributionMethodConfiguration::sampleParameters()
);
}
}
// This is a autogenerated file:Name
class Name {
public static Name $CAPTURE_DEFEND_Fw_COMPLEX;
public static Name $COMPLETE_AGENT_MISSION;
public static Name $DAMAGE_SHIP;
public static Name $HACK_SOMETHING;
public static Name $KILL_CAPSULEER;
public static Name $KILL_Npc;
public static Name $MANUFACTURE;
public static Name $MINE_ORE;
public static Name $REMOTE_REPAIR_ARMOR_OR_SHIELD;
public static function init() {
Name::$CAPTURE_DEFEND_Fw_COMPLEX = new Name('CaptureDefendFWComplex');
Name::$COMPLETE_AGENT_MISSION = new Name('CompleteAgentMission');
Name::$DAMAGE_SHIP = new Name('DamageShip');
Name::$HACK_SOMETHING = new Name('HackSomething');
Name::$KILL_CAPSULEER = new Name('KillCapsuleer');
Name::$KILL_Npc = new Name('KillNPC');
Name::$MANUFACTURE = new Name('Manufacture');
Name::$MINE_ORE = new Name('MineOre');
Name::$REMOTE_REPAIR_ARMOR_OR_SHIELD = new Name('RemoteRepairArmorOrShield');
}
private string $enum;
public function __construct(string $enum) {
$this->enum = $enum;
}
/**
* @param Name
* @return string
* @throws Exception
*/
public static function to(Name $obj): string {
switch ($obj->enum) {
case Name::$CAPTURE_DEFEND_Fw_COMPLEX->enum: return 'CaptureDefendFWComplex';
case Name::$COMPLETE_AGENT_MISSION->enum: return 'CompleteAgentMission';
case Name::$DAMAGE_SHIP->enum: return 'DamageShip';
case Name::$HACK_SOMETHING->enum: return 'HackSomething';
case Name::$KILL_CAPSULEER->enum: return 'KillCapsuleer';
case Name::$KILL_Npc->enum: return 'KillNPC';
case Name::$MANUFACTURE->enum: return 'Manufacture';
case Name::$MINE_ORE->enum: return 'MineOre';
case Name::$REMOTE_REPAIR_ARMOR_OR_SHIELD->enum: return 'RemoteRepairArmorOrShield';
}
throw new Exception('the give value is not an enum-value.');
}
/**
* @param mixed
* @return Name
* @throws Exception
*/
public static function from($obj): Name {
switch ($obj) {
case 'CaptureDefendFWComplex': return Name::$CAPTURE_DEFEND_Fw_COMPLEX;
case 'CompleteAgentMission': return Name::$COMPLETE_AGENT_MISSION;
case 'DamageShip': return Name::$DAMAGE_SHIP;
case 'HackSomething': return Name::$HACK_SOMETHING;
case 'KillCapsuleer': return Name::$KILL_CAPSULEER;
case 'KillNPC': return Name::$KILL_Npc;
case 'Manufacture': return Name::$MANUFACTURE;
case 'MineOre': return Name::$MINE_ORE;
case 'RemoteRepairArmorOrShield': return Name::$REMOTE_REPAIR_ARMOR_OR_SHIELD;
}
throw new Exception("Cannot deserialize Name");
}
/**
* @return Name
*/
public static function sample(): Name {
return Name::$CAPTURE_DEFEND_Fw_COMPLEX;
}
}
Name::init();
// This is a autogenerated file:Parameter
class Parameter {
private string $key; // json:key Required
private Matcher $matcher; // json:matcher Required
/**
* @param string $key
* @param Matcher $matcher
*/
public function __construct(string $key, Matcher $matcher) {
$this->key = $key;
$this->matcher = $matcher;
}
/**
* @param string $value
* @throws Exception
* @return string
*/
public static function fromKey(string $value): string {
return $value; /*string*/
}
/**
* @throws Exception
* @return string
*/
public function toKey(): string {
if (Parameter::validateKey($this->key)) {
return $this->key; /*string*/
}
throw new Exception('never get to this Parameter::key');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKey(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Parameter::key");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKey(): string {
if (Parameter::validateKey($this->key)) {
return $this->key;
}
throw new Exception('never get to getKey Parameter::key');
}
/**
* @return string
*/
public static function sampleKey(): string {
return 'Parameter::key::31'; /*31:key*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Matcher
*/
public static function fromMatcher(stdClass $value): Matcher {
return Matcher::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toMatcher(): stdClass {
if (Parameter::validateMatcher($this->matcher)) {
return $this->matcher->to(); /*class*/
}
throw new Exception('never get to this Parameter::matcher');
}
/**
* @param Matcher
* @return bool
* @throws Exception
*/
public static function validateMatcher(Matcher $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Matcher
*/
public function getMatcher(): Matcher {
if (Parameter::validateMatcher($this->matcher)) {
return $this->matcher;
}
throw new Exception('never get to getMatcher Parameter::matcher');
}
/**
* @return Matcher
*/
public static function sampleMatcher(): Matcher {
return Matcher::sample(); /*32:matcher*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Parameter::validateKey($this->key)
|| Parameter::validateMatcher($this->matcher);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'key'} = $this->toKey();
$out->{'matcher'} = $this->toMatcher();
return $out;
}
/**
* @param stdClass $obj
* @return Parameter
* @throws Exception
*/
public static function from(stdClass $obj): Parameter {
return new Parameter(
Parameter::fromKey($obj->{'key'})
,Parameter::fromMatcher($obj->{'matcher'})
);
}
/**
* @return Parameter
*/
public static function sample(): Parameter {
return new Parameter(
Parameter::sampleKey()
,Parameter::sampleMatcher()
);
}
}
// This is a autogenerated file:Matcher
class Matcher {
private array $values; // json:values Required
/**
* @param array $values
*/
public function __construct(array $values) {
$this->values = $values;
}
/**
* @param array $value
* @throws Exception
* @return array
*/
public static function fromValues(array $value): array {
return array_map(function ($value) {
return Value::from($value); /*class*/
}, $value);
}
/**
* @throws Exception
* @return array
*/
public function toValues(): array {
if (Matcher::validateValues($this->values)) {
return array_map(function ($value) {
return $value->to(); /*class*/
}, $this->values);
}
throw new Exception('never get to this Matcher::values');
}
/**
* @param array
* @return bool
* @throws Exception
*/
public static function validateValues(array $value): bool {
if (!is_array($value)) {
throw new Exception("Attribute Error:Matcher::values");
}
array_walk($value, function($value_v) {
$value_v->validate();
});
return true;
}
/**
* @throws Exception
* @return array
*/
public function getValues(): array {
if (Matcher::validateValues($this->values)) {
return $this->values;
}
throw new Exception('never get to getValues Matcher::values');
}
/**
* @return array
*/
public static function sampleValues(): array {
return array(
Value::sample() /*31:*/
); /* 31:values*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Matcher::validateValues($this->values);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'values'} = $this->toValues();
return $out;
}
/**
* @param stdClass $obj
* @return Matcher
* @throws Exception
*/
public static function from(stdClass $obj): Matcher {
return new Matcher(
Matcher::fromValues($obj->{'values'})
);
}
/**
* @return Matcher
*/
public static function sample(): Matcher {
return new Matcher(
Matcher::sampleValues()
);
}
}
// This is a autogenerated file:Value
class Value {
private ?array $values; // json:values Optional
private string $valueType; // json:valueType Required
/**
* @param array|null $values
* @param string $valueType
*/
public function __construct(?array $values, string $valueType) {
$this->values = $values;
$this->valueType = $valueType;
}
/**
* @param ?array $value
* @throws Exception
* @return ?array
*/
public static function fromValues(?array $value): ?array {
if (!is_null($value)) {
return array_map(function ($value) {
return $value; /*string*/
}, $value);
} else {
return null;
}
}
/**
* @throws Exception
* @return ?array
*/
public function toValues(): ?array {
if (Value::validateValues($this->values)) {
if (!is_null($this->values)) {
return array_map(function ($value) {
return $value; /*string*/
}, $this->values);
} else {
return null;
}
}
throw new Exception('never get to this Value::values');
}
/**
* @param array|null
* @return bool
* @throws Exception
*/
public static function validateValues(?array $value): bool {
if (!is_null($value)) {
if (!is_array($value)) {
throw new Exception("Attribute Error:Value::values");
}
array_walk($value, function($value_v) {
if (!is_string($value_v)) {
throw new Exception("Attribute Error:Value::values");
}
});
}
return true;
}
/**
* @throws Exception
* @return ?array
*/
public function getValues(): ?array {
if (Value::validateValues($this->values)) {
return $this->values;
}
throw new Exception('never get to getValues Value::values');
}
/**
* @return ?array
*/
public static function sampleValues(): ?array {
return array(
'Value::::31' /*31:*/
); /* 31:values*/
}
/**
* @param string $value
* @throws Exception
* @return string
*/
public static function fromValueType(string $value): string {
return $value; /*string*/
}
/**
* @throws Exception
* @return string
*/
public function toValueType(): string {
if (Value::validateValueType($this->valueType)) {
return $this->valueType; /*string*/
}
throw new Exception('never get to this Value::valueType');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateValueType(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Value::valueType");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getValueType(): string {
if (Value::validateValueType($this->valueType)) {
return $this->valueType;
}
throw new Exception('never get to getValueType Value::valueType');
}
/**
* @return string
*/
public static function sampleValueType(): string {
return 'Value::valueType::32'; /*32:valueType*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Value::validateValues($this->values)
|| Value::validateValueType($this->valueType);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'values'} = $this->toValues();
$out->{'valueType'} = $this->toValueType();
return $out;
}
/**
* @param stdClass $obj
* @return Value
* @throws Exception
*/
public static function from(stdClass $obj): Value {
return new Value(
Value::fromValues($obj->{'values'})
,Value::fromValueType($obj->{'valueType'})
);
}
/**
* @return Value
*/
public static function sample(): Value {
return new Value(
Value::sampleValues()
,Value::sampleValueType()
);
}
}
// This is a autogenerated file:MilitaryCampaignObjectiveIssuer
class MilitaryCampaignObjectiveIssuer {
private int $corporationId; // json:corporationID Required
/**
* @param int $corporationId
*/
public function __construct(int $corporationId) {
$this->corporationId = $corporationId;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromCorporationId(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toCorporationId(): int {
if (MilitaryCampaignObjectiveIssuer::validateCorporationId($this->corporationId)) {
return $this->corporationId; /*int*/
}
throw new Exception('never get to this MilitaryCampaignObjectiveIssuer::corporationId');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateCorporationId(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:MilitaryCampaignObjectiveIssuer::corporationId");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getCorporationId(): int {
if (MilitaryCampaignObjectiveIssuer::validateCorporationId($this->corporationId)) {
return $this->corporationId;
}
throw new Exception('never get to getCorporationId MilitaryCampaignObjectiveIssuer::corporationId');
}
/**
* @return int
*/
public static function sampleCorporationId(): int {
return 31; /*31:corporationId*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return MilitaryCampaignObjectiveIssuer::validateCorporationId($this->corporationId);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'corporationID'} = $this->toCorporationId();
return $out;
}
/**
* @param stdClass $obj
* @return MilitaryCampaignObjectiveIssuer
* @throws Exception
*/
public static function from(stdClass $obj): MilitaryCampaignObjectiveIssuer {
return new MilitaryCampaignObjectiveIssuer(
MilitaryCampaignObjectiveIssuer::fromCorporationId($obj->{'corporationID'})
);
}
/**
* @return MilitaryCampaignObjectiveIssuer
*/
public static function sample(): MilitaryCampaignObjectiveIssuer {
return new MilitaryCampaignObjectiveIssuer(
MilitaryCampaignObjectiveIssuer::sampleCorporationId()
);
}
}
// This is a autogenerated file:Rewards
class Rewards {
private Isk $isk; // json:isk Required
private Lp $lp; // json:lp Required
private Standing $standing; // json:standing Required
/**
* @param Isk $isk
* @param Lp $lp
* @param Standing $standing
*/
public function __construct(Isk $isk, Lp $lp, Standing $standing) {
$this->isk = $isk;
$this->lp = $lp;
$this->standing = $standing;
}
/**
* @param stdClass $value
* @throws Exception
* @return Isk
*/
public static function fromIsk(stdClass $value): Isk {
return Isk::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toIsk(): stdClass {
if (Rewards::validateIsk($this->isk)) {
return $this->isk->to(); /*class*/
}
throw new Exception('never get to this Rewards::isk');
}
/**
* @param Isk
* @return bool
* @throws Exception
*/
public static function validateIsk(Isk $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Isk
*/
public function getIsk(): Isk {
if (Rewards::validateIsk($this->isk)) {
return $this->isk;
}
throw new Exception('never get to getIsk Rewards::isk');
}
/**
* @return Isk
*/
public static function sampleIsk(): Isk {
return Isk::sample(); /*31:isk*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Lp
*/
public static function fromLp(stdClass $value): Lp {
return Lp::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toLp(): stdClass {
if (Rewards::validateLp($this->lp)) {
return $this->lp->to(); /*class*/
}
throw new Exception('never get to this Rewards::lp');
}
/**
* @param Lp
* @return bool
* @throws Exception
*/
public static function validateLp(Lp $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Lp
*/
public function getLp(): Lp {
if (Rewards::validateLp($this->lp)) {
return $this->lp;
}
throw new Exception('never get to getLp Rewards::lp');
}
/**
* @return Lp
*/
public static function sampleLp(): Lp {
return Lp::sample(); /*32:lp*/
}
/**
* @param stdClass $value
* @throws Exception
* @return Standing
*/
public static function fromStanding(stdClass $value): Standing {
return Standing::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toStanding(): stdClass {
if (Rewards::validateStanding($this->standing)) {
return $this->standing->to(); /*class*/
}
throw new Exception('never get to this Rewards::standing');
}
/**
* @param Standing
* @return bool
* @throws Exception
*/
public static function validateStanding(Standing $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return Standing
*/
public function getStanding(): Standing {
if (Rewards::validateStanding($this->standing)) {
return $this->standing;
}
throw new Exception('never get to getStanding Rewards::standing');
}
/**
* @return Standing
*/
public static function sampleStanding(): Standing {
return Standing::sample(); /*33:standing*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Rewards::validateIsk($this->isk)
|| Rewards::validateLp($this->lp)
|| Rewards::validateStanding($this->standing);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'isk'} = $this->toIsk();
$out->{'lp'} = $this->toLp();
$out->{'standing'} = $this->toStanding();
return $out;
}
/**
* @param stdClass $obj
* @return Rewards
* @throws Exception
*/
public static function from(stdClass $obj): Rewards {
return new Rewards(
Rewards::fromIsk($obj->{'isk'})
,Rewards::fromLp($obj->{'lp'})
,Rewards::fromStanding($obj->{'standing'})
);
}
/**
* @return Rewards
*/
public static function sample(): Rewards {
return new Rewards(
Rewards::sampleIsk()
,Rewards::sampleLp()
,Rewards::sampleStanding()
);
}
}
// This is a autogenerated file:Isk
class Isk {
private int $amountPerInterval; // json:amountPerInterval Required
private IskIssuer $issuer; // json:issuer Required
private int $progressInterval; // json:progressInterval Required
/**
* @param int $amountPerInterval
* @param IskIssuer $issuer
* @param int $progressInterval
*/
public function __construct(int $amountPerInterval, IskIssuer $issuer, int $progressInterval) {
$this->amountPerInterval = $amountPerInterval;
$this->issuer = $issuer;
$this->progressInterval = $progressInterval;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromAmountPerInterval(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toAmountPerInterval(): int {
if (Isk::validateAmountPerInterval($this->amountPerInterval)) {
return $this->amountPerInterval; /*int*/
}
throw new Exception('never get to this Isk::amountPerInterval');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateAmountPerInterval(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:Isk::amountPerInterval");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getAmountPerInterval(): int {
if (Isk::validateAmountPerInterval($this->amountPerInterval)) {
return $this->amountPerInterval;
}
throw new Exception('never get to getAmountPerInterval Isk::amountPerInterval');
}
/**
* @return int
*/
public static function sampleAmountPerInterval(): int {
return 31; /*31:amountPerInterval*/
}
/**
* @param stdClass $value
* @throws Exception
* @return IskIssuer
*/
public static function fromIssuer(stdClass $value): IskIssuer {
return IskIssuer::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toIssuer(): stdClass {
if (Isk::validateIssuer($this->issuer)) {
return $this->issuer->to(); /*class*/
}
throw new Exception('never get to this Isk::issuer');
}
/**
* @param IskIssuer
* @return bool
* @throws Exception
*/
public static function validateIssuer(IskIssuer $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return IskIssuer
*/
public function getIssuer(): IskIssuer {
if (Isk::validateIssuer($this->issuer)) {
return $this->issuer;
}
throw new Exception('never get to getIssuer Isk::issuer');
}
/**
* @return IskIssuer
*/
public static function sampleIssuer(): IskIssuer {
return IskIssuer::sample(); /*32:issuer*/
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromProgressInterval(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toProgressInterval(): int {
if (Isk::validateProgressInterval($this->progressInterval)) {
return $this->progressInterval; /*int*/
}
throw new Exception('never get to this Isk::progressInterval');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateProgressInterval(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:Isk::progressInterval");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getProgressInterval(): int {
if (Isk::validateProgressInterval($this->progressInterval)) {
return $this->progressInterval;
}
throw new Exception('never get to getProgressInterval Isk::progressInterval');
}
/**
* @return int
*/
public static function sampleProgressInterval(): int {
return 33; /*33:progressInterval*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Isk::validateAmountPerInterval($this->amountPerInterval)
|| Isk::validateIssuer($this->issuer)
|| Isk::validateProgressInterval($this->progressInterval);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'amountPerInterval'} = $this->toAmountPerInterval();
$out->{'issuer'} = $this->toIssuer();
$out->{'progressInterval'} = $this->toProgressInterval();
return $out;
}
/**
* @param stdClass $obj
* @return Isk
* @throws Exception
*/
public static function from(stdClass $obj): Isk {
return new Isk(
Isk::fromAmountPerInterval($obj->{'amountPerInterval'})
,Isk::fromIssuer($obj->{'issuer'})
,Isk::fromProgressInterval($obj->{'progressInterval'})
);
}
/**
* @return Isk
*/
public static function sample(): Isk {
return new Isk(
Isk::sampleAmountPerInterval()
,Isk::sampleIssuer()
,Isk::sampleProgressInterval()
);
}
}
// This is a autogenerated file:IskIssuer
class IskIssuer {
private int $corporationId; // json:corporationID Required
/**
* @param int $corporationId
*/
public function __construct(int $corporationId) {
$this->corporationId = $corporationId;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromCorporationId(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toCorporationId(): int {
if (IskIssuer::validateCorporationId($this->corporationId)) {
return $this->corporationId; /*int*/
}
throw new Exception('never get to this IskIssuer::corporationId');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateCorporationId(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:IskIssuer::corporationId");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getCorporationId(): int {
if (IskIssuer::validateCorporationId($this->corporationId)) {
return $this->corporationId;
}
throw new Exception('never get to getCorporationId IskIssuer::corporationId');
}
/**
* @return int
*/
public static function sampleCorporationId(): int {
return 31; /*31:corporationId*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return IskIssuer::validateCorporationId($this->corporationId);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'corporationID'} = $this->toCorporationId();
return $out;
}
/**
* @param stdClass $obj
* @return IskIssuer
* @throws Exception
*/
public static function from(stdClass $obj): IskIssuer {
return new IskIssuer(
IskIssuer::fromCorporationId($obj->{'corporationID'})
);
}
/**
* @return IskIssuer
*/
public static function sample(): IskIssuer {
return new IskIssuer(
IskIssuer::sampleCorporationId()
);
}
}
// This is a autogenerated file:Lp
class Lp {
private int $amountPerInterval; // json:amountPerInterval Required
private LpIssuer $issuer; // json:issuer Required
private int $progressInterval; // json:progressInterval Required
/**
* @param int $amountPerInterval
* @param LpIssuer $issuer
* @param int $progressInterval
*/
public function __construct(int $amountPerInterval, LpIssuer $issuer, int $progressInterval) {
$this->amountPerInterval = $amountPerInterval;
$this->issuer = $issuer;
$this->progressInterval = $progressInterval;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromAmountPerInterval(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toAmountPerInterval(): int {
if (Lp::validateAmountPerInterval($this->amountPerInterval)) {
return $this->amountPerInterval; /*int*/
}
throw new Exception('never get to this Lp::amountPerInterval');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateAmountPerInterval(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:Lp::amountPerInterval");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getAmountPerInterval(): int {
if (Lp::validateAmountPerInterval($this->amountPerInterval)) {
return $this->amountPerInterval;
}
throw new Exception('never get to getAmountPerInterval Lp::amountPerInterval');
}
/**
* @return int
*/
public static function sampleAmountPerInterval(): int {
return 31; /*31:amountPerInterval*/
}
/**
* @param stdClass $value
* @throws Exception
* @return LpIssuer
*/
public static function fromIssuer(stdClass $value): LpIssuer {
return LpIssuer::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toIssuer(): stdClass {
if (Lp::validateIssuer($this->issuer)) {
return $this->issuer->to(); /*class*/
}
throw new Exception('never get to this Lp::issuer');
}
/**
* @param LpIssuer
* @return bool
* @throws Exception
*/
public static function validateIssuer(LpIssuer $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return LpIssuer
*/
public function getIssuer(): LpIssuer {
if (Lp::validateIssuer($this->issuer)) {
return $this->issuer;
}
throw new Exception('never get to getIssuer Lp::issuer');
}
/**
* @return LpIssuer
*/
public static function sampleIssuer(): LpIssuer {
return LpIssuer::sample(); /*32:issuer*/
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromProgressInterval(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toProgressInterval(): int {
if (Lp::validateProgressInterval($this->progressInterval)) {
return $this->progressInterval; /*int*/
}
throw new Exception('never get to this Lp::progressInterval');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateProgressInterval(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:Lp::progressInterval");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getProgressInterval(): int {
if (Lp::validateProgressInterval($this->progressInterval)) {
return $this->progressInterval;
}
throw new Exception('never get to getProgressInterval Lp::progressInterval');
}
/**
* @return int
*/
public static function sampleProgressInterval(): int {
return 33; /*33:progressInterval*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Lp::validateAmountPerInterval($this->amountPerInterval)
|| Lp::validateIssuer($this->issuer)
|| Lp::validateProgressInterval($this->progressInterval);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'amountPerInterval'} = $this->toAmountPerInterval();
$out->{'issuer'} = $this->toIssuer();
$out->{'progressInterval'} = $this->toProgressInterval();
return $out;
}
/**
* @param stdClass $obj
* @return Lp
* @throws Exception
*/
public static function from(stdClass $obj): Lp {
return new Lp(
Lp::fromAmountPerInterval($obj->{'amountPerInterval'})
,Lp::fromIssuer($obj->{'issuer'})
,Lp::fromProgressInterval($obj->{'progressInterval'})
);
}
/**
* @return Lp
*/
public static function sample(): Lp {
return new Lp(
Lp::sampleAmountPerInterval()
,Lp::sampleIssuer()
,Lp::sampleProgressInterval()
);
}
}
// This is a autogenerated file:LpIssuer
class LpIssuer {
private int $corporationId; // json:corporationID Required
/**
* @param int $corporationId
*/
public function __construct(int $corporationId) {
$this->corporationId = $corporationId;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromCorporationId(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toCorporationId(): int {
if (LpIssuer::validateCorporationId($this->corporationId)) {
return $this->corporationId; /*int*/
}
throw new Exception('never get to this LpIssuer::corporationId');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateCorporationId(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:LpIssuer::corporationId");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getCorporationId(): int {
if (LpIssuer::validateCorporationId($this->corporationId)) {
return $this->corporationId;
}
throw new Exception('never get to getCorporationId LpIssuer::corporationId');
}
/**
* @return int
*/
public static function sampleCorporationId(): int {
return 31; /*31:corporationId*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return LpIssuer::validateCorporationId($this->corporationId);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'corporationID'} = $this->toCorporationId();
return $out;
}
/**
* @param stdClass $obj
* @return LpIssuer
* @throws Exception
*/
public static function from(stdClass $obj): LpIssuer {
return new LpIssuer(
LpIssuer::fromCorporationId($obj->{'corporationID'})
);
}
/**
* @return LpIssuer
*/
public static function sample(): LpIssuer {
return new LpIssuer(
LpIssuer::sampleCorporationId()
);
}
}
// This is a autogenerated file:Standing
class Standing {
private float $gainPercentPerInterval; // json:gainPercentPerInterval Required
private StandingIssuer $issuer; // json:issuer Required
private int $progressInterval; // json:progressInterval Required
/**
* @param float $gainPercentPerInterval
* @param StandingIssuer $issuer
* @param int $progressInterval
*/
public function __construct(float $gainPercentPerInterval, StandingIssuer $issuer, int $progressInterval) {
$this->gainPercentPerInterval = $gainPercentPerInterval;
$this->issuer = $issuer;
$this->progressInterval = $progressInterval;
}
/**
* @param float $value
* @throws Exception
* @return float
*/
public static function fromGainPercentPerInterval(float $value): float {
return $value; /*float*/
}
/**
* @throws Exception
* @return float
*/
public function toGainPercentPerInterval(): float {
if (Standing::validateGainPercentPerInterval($this->gainPercentPerInterval)) {
return $this->gainPercentPerInterval; /*float*/
}
throw new Exception('never get to this Standing::gainPercentPerInterval');
}
/**
* @param float
* @return bool
* @throws Exception
*/
public static function validateGainPercentPerInterval(float $value): bool {
if (!is_float($value)) {
throw new Exception("Attribute Error:Standing::gainPercentPerInterval");
}
return true;
}
/**
* @throws Exception
* @return float
*/
public function getGainPercentPerInterval(): float {
if (Standing::validateGainPercentPerInterval($this->gainPercentPerInterval)) {
return $this->gainPercentPerInterval;
}
throw new Exception('never get to getGainPercentPerInterval Standing::gainPercentPerInterval');
}
/**
* @return float
*/
public static function sampleGainPercentPerInterval(): float {
return 31.031; /*31:gainPercentPerInterval*/
}
/**
* @param stdClass $value
* @throws Exception
* @return StandingIssuer
*/
public static function fromIssuer(stdClass $value): StandingIssuer {
return StandingIssuer::from($value); /*class*/
}
/**
* @throws Exception
* @return stdClass
*/
public function toIssuer(): stdClass {
if (Standing::validateIssuer($this->issuer)) {
return $this->issuer->to(); /*class*/
}
throw new Exception('never get to this Standing::issuer');
}
/**
* @param StandingIssuer
* @return bool
* @throws Exception
*/
public static function validateIssuer(StandingIssuer $value): bool {
$value->validate();
return true;
}
/**
* @throws Exception
* @return StandingIssuer
*/
public function getIssuer(): StandingIssuer {
if (Standing::validateIssuer($this->issuer)) {
return $this->issuer;
}
throw new Exception('never get to getIssuer Standing::issuer');
}
/**
* @return StandingIssuer
*/
public static function sampleIssuer(): StandingIssuer {
return StandingIssuer::sample(); /*32:issuer*/
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromProgressInterval(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toProgressInterval(): int {
if (Standing::validateProgressInterval($this->progressInterval)) {
return $this->progressInterval; /*int*/
}
throw new Exception('never get to this Standing::progressInterval');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateProgressInterval(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:Standing::progressInterval");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getProgressInterval(): int {
if (Standing::validateProgressInterval($this->progressInterval)) {
return $this->progressInterval;
}
throw new Exception('never get to getProgressInterval Standing::progressInterval');
}
/**
* @return int
*/
public static function sampleProgressInterval(): int {
return 33; /*33:progressInterval*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Standing::validateGainPercentPerInterval($this->gainPercentPerInterval)
|| Standing::validateIssuer($this->issuer)
|| Standing::validateProgressInterval($this->progressInterval);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'gainPercentPerInterval'} = $this->toGainPercentPerInterval();
$out->{'issuer'} = $this->toIssuer();
$out->{'progressInterval'} = $this->toProgressInterval();
return $out;
}
/**
* @param stdClass $obj
* @return Standing
* @throws Exception
*/
public static function from(stdClass $obj): Standing {
return new Standing(
Standing::fromGainPercentPerInterval($obj->{'gainPercentPerInterval'})
,Standing::fromIssuer($obj->{'issuer'})
,Standing::fromProgressInterval($obj->{'progressInterval'})
);
}
/**
* @return Standing
*/
public static function sample(): Standing {
return new Standing(
Standing::sampleGainPercentPerInterval()
,Standing::sampleIssuer()
,Standing::sampleProgressInterval()
);
}
}
// This is a autogenerated file:StandingIssuer
class StandingIssuer {
private int $factionId; // json:factionID Required
/**
* @param int $factionId
*/
public function __construct(int $factionId) {
$this->factionId = $factionId;
}
/**
* @param int $value
* @throws Exception
* @return int
*/
public static function fromFactionId(int $value): int {
return $value; /*int*/
}
/**
* @throws Exception
* @return int
*/
public function toFactionId(): int {
if (StandingIssuer::validateFactionId($this->factionId)) {
return $this->factionId; /*int*/
}
throw new Exception('never get to this StandingIssuer::factionId');
}
/**
* @param int
* @return bool
* @throws Exception
*/
public static function validateFactionId(int $value): bool {
if (!is_integer($value)) {
throw new Exception("Attribute Error:StandingIssuer::factionId");
}
return true;
}
/**
* @throws Exception
* @return int
*/
public function getFactionId(): int {
if (StandingIssuer::validateFactionId($this->factionId)) {
return $this->factionId;
}
throw new Exception('never get to getFactionId StandingIssuer::factionId');
}
/**
* @return int
*/
public static function sampleFactionId(): int {
return 31; /*31:factionId*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return StandingIssuer::validateFactionId($this->factionId);
}
/**
* @return stdClass
* @throws Exception
*/
public function to(): stdClass {
$out = new stdClass();
$out->{'factionID'} = $this->toFactionId();
return $out;
}
/**
* @param stdClass $obj
* @return StandingIssuer
* @throws Exception
*/
public static function from(stdClass $obj): StandingIssuer {
return new StandingIssuer(
StandingIssuer::fromFactionId($obj->{'factionID'})
);
}
/**
* @return StandingIssuer
*/
public static function sample(): StandingIssuer {
return new StandingIssuer(
StandingIssuer::sampleFactionId()
);
}
}
// This is a autogenerated file:Subtitle
class Subtitle {
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 (Subtitle::validateDe($this->de)) {
return $this->de; /*string*/
}
throw new Exception('never get to this Subtitle::de');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateDe(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::de");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getDe(): string {
if (Subtitle::validateDe($this->de)) {
return $this->de;
}
throw new Exception('never get to getDe Subtitle::de');
}
/**
* @return string
*/
public static function sampleDe(): string {
return 'Subtitle::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 (Subtitle::validateEn($this->en)) {
return $this->en; /*string*/
}
throw new Exception('never get to this Subtitle::en');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEn(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::en");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEn(): string {
if (Subtitle::validateEn($this->en)) {
return $this->en;
}
throw new Exception('never get to getEn Subtitle::en');
}
/**
* @return string
*/
public static function sampleEn(): string {
return 'Subtitle::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 (Subtitle::validateEs($this->es)) {
return $this->es; /*string*/
}
throw new Exception('never get to this Subtitle::es');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEs(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::es");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEs(): string {
if (Subtitle::validateEs($this->es)) {
return $this->es;
}
throw new Exception('never get to getEs Subtitle::es');
}
/**
* @return string
*/
public static function sampleEs(): string {
return 'Subtitle::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 (Subtitle::validateFr($this->fr)) {
return $this->fr; /*string*/
}
throw new Exception('never get to this Subtitle::fr');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateFr(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::fr");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getFr(): string {
if (Subtitle::validateFr($this->fr)) {
return $this->fr;
}
throw new Exception('never get to getFr Subtitle::fr');
}
/**
* @return string
*/
public static function sampleFr(): string {
return 'Subtitle::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 (Subtitle::validateJa($this->ja)) {
return $this->ja; /*string*/
}
throw new Exception('never get to this Subtitle::ja');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateJa(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::ja");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getJa(): string {
if (Subtitle::validateJa($this->ja)) {
return $this->ja;
}
throw new Exception('never get to getJa Subtitle::ja');
}
/**
* @return string
*/
public static function sampleJa(): string {
return 'Subtitle::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 (Subtitle::validateKo($this->ko)) {
return $this->ko; /*string*/
}
throw new Exception('never get to this Subtitle::ko');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKo(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::ko");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKo(): string {
if (Subtitle::validateKo($this->ko)) {
return $this->ko;
}
throw new Exception('never get to getKo Subtitle::ko');
}
/**
* @return string
*/
public static function sampleKo(): string {
return 'Subtitle::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 (Subtitle::validateRu($this->ru)) {
return $this->ru; /*string*/
}
throw new Exception('never get to this Subtitle::ru');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateRu(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::ru");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getRu(): string {
if (Subtitle::validateRu($this->ru)) {
return $this->ru;
}
throw new Exception('never get to getRu Subtitle::ru');
}
/**
* @return string
*/
public static function sampleRu(): string {
return 'Subtitle::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 (Subtitle::validateZh($this->zh)) {
return $this->zh; /*string*/
}
throw new Exception('never get to this Subtitle::zh');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateZh(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Subtitle::zh");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getZh(): string {
if (Subtitle::validateZh($this->zh)) {
return $this->zh;
}
throw new Exception('never get to getZh Subtitle::zh');
}
/**
* @return string
*/
public static function sampleZh(): string {
return 'Subtitle::zh::38'; /*38:zh*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Subtitle::validateDe($this->de)
|| Subtitle::validateEn($this->en)
|| Subtitle::validateEs($this->es)
|| Subtitle::validateFr($this->fr)
|| Subtitle::validateJa($this->ja)
|| Subtitle::validateKo($this->ko)
|| Subtitle::validateRu($this->ru)
|| Subtitle::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 Subtitle
* @throws Exception
*/
public static function from(stdClass $obj): Subtitle {
return new Subtitle(
Subtitle::fromDe($obj->{'de'})
,Subtitle::fromEn($obj->{'en'})
,Subtitle::fromEs($obj->{'es'})
,Subtitle::fromFr($obj->{'fr'})
,Subtitle::fromJa($obj->{'ja'})
,Subtitle::fromKo($obj->{'ko'})
,Subtitle::fromRu($obj->{'ru'})
,Subtitle::fromZh($obj->{'zh'})
);
}
/**
* @return Subtitle
*/
public static function sample(): Subtitle {
return new Subtitle(
Subtitle::sampleDe()
,Subtitle::sampleEn()
,Subtitle::sampleEs()
,Subtitle::sampleFr()
,Subtitle::sampleJa()
,Subtitle::sampleKo()
,Subtitle::sampleRu()
,Subtitle::sampleZh()
);
}
}
// This is a autogenerated file:Title
class Title {
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 (Title::validateDe($this->de)) {
return $this->de; /*string*/
}
throw new Exception('never get to this Title::de');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateDe(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::de");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getDe(): string {
if (Title::validateDe($this->de)) {
return $this->de;
}
throw new Exception('never get to getDe Title::de');
}
/**
* @return string
*/
public static function sampleDe(): string {
return 'Title::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 (Title::validateEn($this->en)) {
return $this->en; /*string*/
}
throw new Exception('never get to this Title::en');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEn(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::en");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEn(): string {
if (Title::validateEn($this->en)) {
return $this->en;
}
throw new Exception('never get to getEn Title::en');
}
/**
* @return string
*/
public static function sampleEn(): string {
return 'Title::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 (Title::validateEs($this->es)) {
return $this->es; /*string*/
}
throw new Exception('never get to this Title::es');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateEs(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::es");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getEs(): string {
if (Title::validateEs($this->es)) {
return $this->es;
}
throw new Exception('never get to getEs Title::es');
}
/**
* @return string
*/
public static function sampleEs(): string {
return 'Title::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 (Title::validateFr($this->fr)) {
return $this->fr; /*string*/
}
throw new Exception('never get to this Title::fr');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateFr(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::fr");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getFr(): string {
if (Title::validateFr($this->fr)) {
return $this->fr;
}
throw new Exception('never get to getFr Title::fr');
}
/**
* @return string
*/
public static function sampleFr(): string {
return 'Title::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 (Title::validateJa($this->ja)) {
return $this->ja; /*string*/
}
throw new Exception('never get to this Title::ja');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateJa(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::ja");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getJa(): string {
if (Title::validateJa($this->ja)) {
return $this->ja;
}
throw new Exception('never get to getJa Title::ja');
}
/**
* @return string
*/
public static function sampleJa(): string {
return 'Title::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 (Title::validateKo($this->ko)) {
return $this->ko; /*string*/
}
throw new Exception('never get to this Title::ko');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateKo(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::ko");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getKo(): string {
if (Title::validateKo($this->ko)) {
return $this->ko;
}
throw new Exception('never get to getKo Title::ko');
}
/**
* @return string
*/
public static function sampleKo(): string {
return 'Title::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 (Title::validateRu($this->ru)) {
return $this->ru; /*string*/
}
throw new Exception('never get to this Title::ru');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateRu(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::ru");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getRu(): string {
if (Title::validateRu($this->ru)) {
return $this->ru;
}
throw new Exception('never get to getRu Title::ru');
}
/**
* @return string
*/
public static function sampleRu(): string {
return 'Title::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 (Title::validateZh($this->zh)) {
return $this->zh; /*string*/
}
throw new Exception('never get to this Title::zh');
}
/**
* @param string
* @return bool
* @throws Exception
*/
public static function validateZh(string $value): bool {
if (!is_string($value)) {
throw new Exception("Attribute Error:Title::zh");
}
return true;
}
/**
* @throws Exception
* @return string
*/
public function getZh(): string {
if (Title::validateZh($this->zh)) {
return $this->zh;
}
throw new Exception('never get to getZh Title::zh');
}
/**
* @return string
*/
public static function sampleZh(): string {
return 'Title::zh::38'; /*38:zh*/
}
/**
* @throws Exception
* @return bool
*/
public function validate(): bool {
return Title::validateDe($this->de)
|| Title::validateEn($this->en)
|| Title::validateEs($this->es)
|| Title::validateFr($this->fr)
|| Title::validateJa($this->ja)
|| Title::validateKo($this->ko)
|| Title::validateRu($this->ru)
|| Title::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 Title
* @throws Exception
*/
public static function from(stdClass $obj): Title {
return new Title(
Title::fromDe($obj->{'de'})
,Title::fromEn($obj->{'en'})
,Title::fromEs($obj->{'es'})
,Title::fromFr($obj->{'fr'})
,Title::fromJa($obj->{'ja'})
,Title::fromKo($obj->{'ko'})
,Title::fromRu($obj->{'ru'})
,Title::fromZh($obj->{'zh'})
);
}
/**
* @return Title
*/
public static function sample(): Title {
return new Title(
Title::sampleDe()
,Title::sampleEn()
,Title::sampleEs()
,Title::sampleFr()
,Title::sampleJa()
,Title::sampleKo()
,Title::sampleRu()
,Title::sampleZh()
);
}
}
from typing import Any, Optional, List, TypeVar, Type, cast, Callable
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_class(c: Type[T], x: Any) -> dict:
assert isinstance(x, c)
return cast(Any, x).to_dict()
def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
assert isinstance(x, list)
return [f(y) for y in x]
def to_enum(c: Type[EnumT], x: Any) -> EnumT:
assert isinstance(x, c)
return x.value
def from_float(x: Any) -> float:
assert isinstance(x, (float, int)) and not isinstance(x, bool)
return float(x)
def to_float(x: Any) -> float:
assert isinstance(x, (int, float))
return x
class RestrictionTooltip:
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) -> 'RestrictionTooltip':
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 RestrictionTooltip(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 Warning1:
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) -> 'Warning1':
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 Warning1(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 Warning2:
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) -> 'Warning2':
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 Warning2(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 Annotations:
required_enlistment_with_faction_id: int
restriction_tooltip: RestrictionTooltip
warning1: Warning1
warning2: Optional[Warning2]
def __init__(self, required_enlistment_with_faction_id: int, restriction_tooltip: RestrictionTooltip, warning1: Warning1, warning2: Optional[Warning2]) -> None:
self.required_enlistment_with_faction_id = required_enlistment_with_faction_id
self.restriction_tooltip = restriction_tooltip
self.warning1 = warning1
self.warning2 = warning2
@staticmethod
def from_dict(obj: Any) -> 'Annotations':
assert isinstance(obj, dict)
required_enlistment_with_faction_id = from_int(obj.get("requiredEnlistmentWithFactionID"))
restriction_tooltip = RestrictionTooltip.from_dict(obj.get("restrictionTooltip"))
warning1 = Warning1.from_dict(obj.get("warning1"))
warning2 = from_union([Warning2.from_dict, from_none], obj.get("warning2"))
return Annotations(required_enlistment_with_faction_id, restriction_tooltip, warning1, warning2)
def to_dict(self) -> dict:
result: dict = {}
result["requiredEnlistmentWithFactionID"] = from_int(self.required_enlistment_with_faction_id)
result["restrictionTooltip"] = to_class(RestrictionTooltip, self.restriction_tooltip)
result["warning1"] = to_class(Warning1, self.warning1)
if self.warning2 is not None:
result["warning2"] = from_union([lambda x: to_class(Warning2, x), from_none], self.warning2)
return result
class Name(Enum):
CAPTURE_DEFEND_FW_COMPLEX = "CaptureDefendFWComplex"
COMPLETE_AGENT_MISSION = "CompleteAgentMission"
DAMAGE_SHIP = "DamageShip"
HACK_SOMETHING = "HackSomething"
KILL_CAPSULEER = "KillCapsuleer"
KILL_NPC = "KillNPC"
MANUFACTURE = "Manufacture"
MINE_ORE = "MineOre"
REMOTE_REPAIR_ARMOR_OR_SHIELD = "RemoteRepairArmorOrShield"
class Value:
values: Optional[List[str]]
value_type: str
def __init__(self, values: Optional[List[str]], value_type: str) -> None:
self.values = values
self.value_type = value_type
@staticmethod
def from_dict(obj: Any) -> 'Value':
assert isinstance(obj, dict)
values = from_union([lambda x: from_list(from_str, x), from_none], obj.get("values"))
value_type = from_str(obj.get("valueType"))
return Value(values, value_type)
def to_dict(self) -> dict:
result: dict = {}
if self.values is not None:
result["values"] = from_union([lambda x: from_list(from_str, x), from_none], self.values)
result["valueType"] = from_str(self.value_type)
return result
class Matcher:
values: List[Value]
def __init__(self, values: List[Value]) -> None:
self.values = values
@staticmethod
def from_dict(obj: Any) -> 'Matcher':
assert isinstance(obj, dict)
values = from_list(Value.from_dict, obj.get("values"))
return Matcher(values)
def to_dict(self) -> dict:
result: dict = {}
result["values"] = from_list(lambda x: to_class(Value, x), self.values)
return result
class Parameter:
key: str
matcher: Matcher
def __init__(self, key: str, matcher: Matcher) -> None:
self.key = key
self.matcher = matcher
@staticmethod
def from_dict(obj: Any) -> 'Parameter':
assert isinstance(obj, dict)
key = from_str(obj.get("key"))
matcher = Matcher.from_dict(obj.get("matcher"))
return Parameter(key, matcher)
def to_dict(self) -> dict:
result: dict = {}
result["key"] = from_str(self.key)
result["matcher"] = to_class(Matcher, self.matcher)
return result
class ContributionMethodConfiguration:
name: Name
parameters: List[Parameter]
def __init__(self, name: Name, parameters: List[Parameter]) -> None:
self.name = name
self.parameters = parameters
@staticmethod
def from_dict(obj: Any) -> 'ContributionMethodConfiguration':
assert isinstance(obj, dict)
name = Name(obj.get("name"))
parameters = from_list(Parameter.from_dict, obj.get("parameters"))
return ContributionMethodConfiguration(name, parameters)
def to_dict(self) -> dict:
result: dict = {}
result["name"] = to_enum(Name, self.name)
result["parameters"] = from_list(lambda x: to_class(Parameter, x), self.parameters)
return result
class MilitaryCampaignObjectiveIssuer:
corporation_id: int
def __init__(self, corporation_id: int) -> None:
self.corporation_id = corporation_id
@staticmethod
def from_dict(obj: Any) -> 'MilitaryCampaignObjectiveIssuer':
assert isinstance(obj, dict)
corporation_id = from_int(obj.get("corporationID"))
return MilitaryCampaignObjectiveIssuer(corporation_id)
def to_dict(self) -> dict:
result: dict = {}
result["corporationID"] = from_int(self.corporation_id)
return result
class IskIssuer:
corporation_id: int
def __init__(self, corporation_id: int) -> None:
self.corporation_id = corporation_id
@staticmethod
def from_dict(obj: Any) -> 'IskIssuer':
assert isinstance(obj, dict)
corporation_id = from_int(obj.get("corporationID"))
return IskIssuer(corporation_id)
def to_dict(self) -> dict:
result: dict = {}
result["corporationID"] = from_int(self.corporation_id)
return result
class Isk:
amount_per_interval: int
issuer: IskIssuer
progress_interval: int
def __init__(self, amount_per_interval: int, issuer: IskIssuer, progress_interval: int) -> None:
self.amount_per_interval = amount_per_interval
self.issuer = issuer
self.progress_interval = progress_interval
@staticmethod
def from_dict(obj: Any) -> 'Isk':
assert isinstance(obj, dict)
amount_per_interval = from_int(obj.get("amountPerInterval"))
issuer = IskIssuer.from_dict(obj.get("issuer"))
progress_interval = from_int(obj.get("progressInterval"))
return Isk(amount_per_interval, issuer, progress_interval)
def to_dict(self) -> dict:
result: dict = {}
result["amountPerInterval"] = from_int(self.amount_per_interval)
result["issuer"] = to_class(IskIssuer, self.issuer)
result["progressInterval"] = from_int(self.progress_interval)
return result
class LpIssuer:
corporation_id: int
def __init__(self, corporation_id: int) -> None:
self.corporation_id = corporation_id
@staticmethod
def from_dict(obj: Any) -> 'LpIssuer':
assert isinstance(obj, dict)
corporation_id = from_int(obj.get("corporationID"))
return LpIssuer(corporation_id)
def to_dict(self) -> dict:
result: dict = {}
result["corporationID"] = from_int(self.corporation_id)
return result
class Lp:
amount_per_interval: int
issuer: LpIssuer
progress_interval: int
def __init__(self, amount_per_interval: int, issuer: LpIssuer, progress_interval: int) -> None:
self.amount_per_interval = amount_per_interval
self.issuer = issuer
self.progress_interval = progress_interval
@staticmethod
def from_dict(obj: Any) -> 'Lp':
assert isinstance(obj, dict)
amount_per_interval = from_int(obj.get("amountPerInterval"))
issuer = LpIssuer.from_dict(obj.get("issuer"))
progress_interval = from_int(obj.get("progressInterval"))
return Lp(amount_per_interval, issuer, progress_interval)
def to_dict(self) -> dict:
result: dict = {}
result["amountPerInterval"] = from_int(self.amount_per_interval)
result["issuer"] = to_class(LpIssuer, self.issuer)
result["progressInterval"] = from_int(self.progress_interval)
return result
class StandingIssuer:
faction_id: int
def __init__(self, faction_id: int) -> None:
self.faction_id = faction_id
@staticmethod
def from_dict(obj: Any) -> 'StandingIssuer':
assert isinstance(obj, dict)
faction_id = from_int(obj.get("factionID"))
return StandingIssuer(faction_id)
def to_dict(self) -> dict:
result: dict = {}
result["factionID"] = from_int(self.faction_id)
return result
class Standing:
gain_percent_per_interval: float
issuer: StandingIssuer
progress_interval: int
def __init__(self, gain_percent_per_interval: float, issuer: StandingIssuer, progress_interval: int) -> None:
self.gain_percent_per_interval = gain_percent_per_interval
self.issuer = issuer
self.progress_interval = progress_interval
@staticmethod
def from_dict(obj: Any) -> 'Standing':
assert isinstance(obj, dict)
gain_percent_per_interval = from_float(obj.get("gainPercentPerInterval"))
issuer = StandingIssuer.from_dict(obj.get("issuer"))
progress_interval = from_int(obj.get("progressInterval"))
return Standing(gain_percent_per_interval, issuer, progress_interval)
def to_dict(self) -> dict:
result: dict = {}
result["gainPercentPerInterval"] = to_float(self.gain_percent_per_interval)
result["issuer"] = to_class(StandingIssuer, self.issuer)
result["progressInterval"] = from_int(self.progress_interval)
return result
class Rewards:
isk: Isk
lp: Lp
standing: Standing
def __init__(self, isk: Isk, lp: Lp, standing: Standing) -> None:
self.isk = isk
self.lp = lp
self.standing = standing
@staticmethod
def from_dict(obj: Any) -> 'Rewards':
assert isinstance(obj, dict)
isk = Isk.from_dict(obj.get("isk"))
lp = Lp.from_dict(obj.get("lp"))
standing = Standing.from_dict(obj.get("standing"))
return Rewards(isk, lp, standing)
def to_dict(self) -> dict:
result: dict = {}
result["isk"] = to_class(Isk, self.isk)
result["lp"] = to_class(Lp, self.lp)
result["standing"] = to_class(Standing, self.standing)
return result
class Subtitle:
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) -> 'Subtitle':
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 Subtitle(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 Title:
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) -> 'Title':
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 Title(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 MilitaryCampaignObjective:
key: str
annotations: Optional[Annotations]
campaign_id: str
career_path: str
content_tags: List[str]
contribution_method_configuration: ContributionMethodConfiguration
issuer: MilitaryCampaignObjectiveIssuer
max_progress_per_participant: int
presenting_character_id: int
rewards: Rewards
subtitle: Subtitle
target_progress: int
title: Title
def __init__(self, key: str, annotations: Optional[Annotations], campaign_id: str, career_path: str, content_tags: List[str], contribution_method_configuration: ContributionMethodConfiguration, issuer: MilitaryCampaignObjectiveIssuer, max_progress_per_participant: int, presenting_character_id: int, rewards: Rewards, subtitle: Subtitle, target_progress: int, title: Title) -> None:
self.key = key
self.annotations = annotations
self.campaign_id = campaign_id
self.career_path = career_path
self.content_tags = content_tags
self.contribution_method_configuration = contribution_method_configuration
self.issuer = issuer
self.max_progress_per_participant = max_progress_per_participant
self.presenting_character_id = presenting_character_id
self.rewards = rewards
self.subtitle = subtitle
self.target_progress = target_progress
self.title = title
@staticmethod
def from_dict(obj: Any) -> 'MilitaryCampaignObjective':
assert isinstance(obj, dict)
key = from_str(obj.get("_key"))
annotations = from_union([Annotations.from_dict, from_none], obj.get("annotations"))
campaign_id = from_str(obj.get("campaignID"))
career_path = from_str(obj.get("careerPath"))
content_tags = from_list(from_str, obj.get("contentTags"))
contribution_method_configuration = ContributionMethodConfiguration.from_dict(obj.get("contributionMethodConfiguration"))
issuer = MilitaryCampaignObjectiveIssuer.from_dict(obj.get("issuer"))
max_progress_per_participant = from_int(obj.get("maxProgressPerParticipant"))
presenting_character_id = from_int(obj.get("presentingCharacterID"))
rewards = Rewards.from_dict(obj.get("rewards"))
subtitle = Subtitle.from_dict(obj.get("subtitle"))
target_progress = from_int(obj.get("targetProgress"))
title = Title.from_dict(obj.get("title"))
return MilitaryCampaignObjective(key, annotations, campaign_id, career_path, content_tags, contribution_method_configuration, issuer, max_progress_per_participant, presenting_character_id, rewards, subtitle, target_progress, title)
def to_dict(self) -> dict:
result: dict = {}
result["_key"] = from_str(self.key)
if self.annotations is not None:
result["annotations"] = from_union([lambda x: to_class(Annotations, x), from_none], self.annotations)
result["campaignID"] = from_str(self.campaign_id)
result["careerPath"] = from_str(self.career_path)
result["contentTags"] = from_list(from_str, self.content_tags)
result["contributionMethodConfiguration"] = to_class(ContributionMethodConfiguration, self.contribution_method_configuration)
result["issuer"] = to_class(MilitaryCampaignObjectiveIssuer, self.issuer)
result["maxProgressPerParticipant"] = from_int(self.max_progress_per_participant)
result["presentingCharacterID"] = from_int(self.presenting_character_id)
result["rewards"] = to_class(Rewards, self.rewards)
result["subtitle"] = to_class(Subtitle, self.subtitle)
result["targetProgress"] = from_int(self.target_progress)
result["title"] = to_class(Title, self.title)
return result
def military_campaign_objective_from_dict(s: Any) -> MilitaryCampaignObjective:
return MilitaryCampaignObjective.from_dict(s)
def military_campaign_objective_to_dict(x: MilitaryCampaignObjective) -> Any:
return to_class(MilitaryCampaignObjective, x)
// To parse this data:
//
// import { Convert, MilitaryCampaignObjective } from "./file";
//
// const militaryCampaignObjective = Convert.toMilitaryCampaignObjective(json);
//
// These functions will throw an error if the JSON doesn't
// match the expected interface, even if the JSON is valid.
export interface MilitaryCampaignObjective {
_key: string;
annotations?: Annotations;
campaignID: string;
careerPath: string;
contentTags: string[];
contributionMethodConfiguration: ContributionMethodConfiguration;
issuer: MilitaryCampaignObjectiveIssuer;
maxProgressPerParticipant: number;
presentingCharacterID: number;
rewards: Rewards;
subtitle: Subtitle;
targetProgress: number;
title: Title;
[property: string]: any;
}
export interface Annotations {
requiredEnlistmentWithFactionID: number;
restrictionTooltip: RestrictionTooltip;
warning1: Warning1;
warning2?: Warning2;
[property: string]: any;
}
export interface RestrictionTooltip {
de: string;
en: string;
es: string;
fr: string;
ja: string;
ko: string;
ru: string;
zh: string;
[property: string]: any;
}
export interface Warning1 {
de: string;
en: string;
es: string;
fr: string;
ja: string;
ko: string;
ru: string;
zh: string;
[property: string]: any;
}
export interface Warning2 {
de: string;
en: string;
es: string;
fr: string;
ja: string;
ko: string;
ru: string;
zh: string;
[property: string]: any;
}
export interface ContributionMethodConfiguration {
name: Name;
parameters: Parameter[];
[property: string]: any;
}
export enum Name {
CaptureDefendFwComplex = "CaptureDefendFWComplex",
CompleteAgentMission = "CompleteAgentMission",
DamageShip = "DamageShip",
HackSomething = "HackSomething",
KillCapsuleer = "KillCapsuleer",
KillNpc = "KillNPC",
Manufacture = "Manufacture",
MineOre = "MineOre",
RemoteRepairArmorOrShield = "RemoteRepairArmorOrShield",
}
export interface Parameter {
key: string;
matcher: Matcher;
[property: string]: any;
}
export interface Matcher {
values: Value[];
[property: string]: any;
}
export interface Value {
values?: string[];
valueType: string;
[property: string]: any;
}
export interface MilitaryCampaignObjectiveIssuer {
corporationID: number;
[property: string]: any;
}
export interface Rewards {
isk: Isk;
lp: Lp;
standing: Standing;
[property: string]: any;
}
export interface Isk {
amountPerInterval: number;
issuer: IskIssuer;
progressInterval: number;
[property: string]: any;
}
export interface IskIssuer {
corporationID: number;
[property: string]: any;
}
export interface Lp {
amountPerInterval: number;
issuer: LpIssuer;
progressInterval: number;
[property: string]: any;
}
export interface LpIssuer {
corporationID: number;
[property: string]: any;
}
export interface Standing {
gainPercentPerInterval: number;
issuer: StandingIssuer;
progressInterval: number;
[property: string]: any;
}
export interface StandingIssuer {
factionID: number;
[property: string]: any;
}
export interface Subtitle {
de: string;
en: string;
es: string;
fr: string;
ja: string;
ko: string;
ru: string;
zh: string;
[property: string]: any;
}
export interface Title {
de: string;
en: string;
es: string;
fr: string;
ja: string;
ko: string;
ru: string;
zh: string;
[property: string]: any;
}
// Converts JSON strings to/from your types
// and asserts the results of JSON.parse at runtime
export class Convert {
public static toMilitaryCampaignObjective(json: string): MilitaryCampaignObjective {
return cast(JSON.parse(json), r("MilitaryCampaignObjective"));
}
public static militaryCampaignObjectiveToJson(value: MilitaryCampaignObjective): string {
return JSON.stringify(uncast(value, r("MilitaryCampaignObjective")), 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 = {
"MilitaryCampaignObjective": o([
{ json: "_key", js: "_key", typ: "" },
{ json: "annotations", js: "annotations", typ: u(undefined, r("Annotations")) },
{ json: "campaignID", js: "campaignID", typ: "" },
{ json: "careerPath", js: "careerPath", typ: "" },
{ json: "contentTags", js: "contentTags", typ: a("") },
{ json: "contributionMethodConfiguration", js: "contributionMethodConfiguration", typ: r("ContributionMethodConfiguration") },
{ json: "issuer", js: "issuer", typ: r("MilitaryCampaignObjectiveIssuer") },
{ json: "maxProgressPerParticipant", js: "maxProgressPerParticipant", typ: 0 },
{ json: "presentingCharacterID", js: "presentingCharacterID", typ: 0 },
{ json: "rewards", js: "rewards", typ: r("Rewards") },
{ json: "subtitle", js: "subtitle", typ: r("Subtitle") },
{ json: "targetProgress", js: "targetProgress", typ: 0 },
{ json: "title", js: "title", typ: r("Title") },
], "any"),
"Annotations": o([
{ json: "requiredEnlistmentWithFactionID", js: "requiredEnlistmentWithFactionID", typ: 0 },
{ json: "restrictionTooltip", js: "restrictionTooltip", typ: r("RestrictionTooltip") },
{ json: "warning1", js: "warning1", typ: r("Warning1") },
{ json: "warning2", js: "warning2", typ: u(undefined, r("Warning2")) },
], "any"),
"RestrictionTooltip": 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"),
"Warning1": 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"),
"Warning2": 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"),
"ContributionMethodConfiguration": o([
{ json: "name", js: "name", typ: r("Name") },
{ json: "parameters", js: "parameters", typ: a(r("Parameter")) },
], "any"),
"Parameter": o([
{ json: "key", js: "key", typ: "" },
{ json: "matcher", js: "matcher", typ: r("Matcher") },
], "any"),
"Matcher": o([
{ json: "values", js: "values", typ: a(r("Value")) },
], "any"),
"Value": o([
{ json: "values", js: "values", typ: u(undefined, a("")) },
{ json: "valueType", js: "valueType", typ: "" },
], "any"),
"MilitaryCampaignObjectiveIssuer": o([
{ json: "corporationID", js: "corporationID", typ: 0 },
], "any"),
"Rewards": o([
{ json: "isk", js: "isk", typ: r("Isk") },
{ json: "lp", js: "lp", typ: r("Lp") },
{ json: "standing", js: "standing", typ: r("Standing") },
], "any"),
"Isk": o([
{ json: "amountPerInterval", js: "amountPerInterval", typ: 0 },
{ json: "issuer", js: "issuer", typ: r("IskIssuer") },
{ json: "progressInterval", js: "progressInterval", typ: 0 },
], "any"),
"IskIssuer": o([
{ json: "corporationID", js: "corporationID", typ: 0 },
], "any"),
"Lp": o([
{ json: "amountPerInterval", js: "amountPerInterval", typ: 0 },
{ json: "issuer", js: "issuer", typ: r("LpIssuer") },
{ json: "progressInterval", js: "progressInterval", typ: 0 },
], "any"),
"LpIssuer": o([
{ json: "corporationID", js: "corporationID", typ: 0 },
], "any"),
"Standing": o([
{ json: "gainPercentPerInterval", js: "gainPercentPerInterval", typ: 3.14 },
{ json: "issuer", js: "issuer", typ: r("StandingIssuer") },
{ json: "progressInterval", js: "progressInterval", typ: 0 },
], "any"),
"StandingIssuer": o([
{ json: "factionID", js: "factionID", typ: 0 },
], "any"),
"Subtitle": 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"),
"Title": 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"),
"Name": [
"CaptureDefendFWComplex",
"CompleteAgentMission",
"DamageShip",
"HackSomething",
"KillCapsuleer",
"KillNPC",
"Manufacture",
"MineOre",
"RemoteRepairArmorOrShield",
],
};