ZTravel/ZTravel.API/HAFAS/HafasDepartureRawResponse.cs

277 lines
13 KiB
C#

// <auto-generated />
//
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
//
// using ZTravel.API.HAFAS;
//
// var hafasDepartureRawResponse = HafasDepartureRawResponse.FromJson(jsonString);
namespace ZTravel.API.HAFAS
{
using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using J = Newtonsoft.Json.JsonPropertyAttribute;
using R = Newtonsoft.Json.Required;
using N = Newtonsoft.Json.NullValueHandling;
public partial class HafasDepartureRawResponse
{
[J("ver")] public string Ver { get; set; }
[J("ext")] public string Ext { get; set; }
[J("lang")] public string Lang { get; set; }
[J("id")] public string Id { get; set; }
[J("err")] public string Err { get; set; }
[J("cInfo")] public CInfo CInfo { get; set; }
[J("svcResL")] public List<SvcResL> SvcResL { get; set; }
}
public partial class CInfo
{
[J("code")] public string Code { get; set; }
[J("url")] public string Url { get; set; }
[J("msg")] public string Msg { get; set; }
}
public partial class SvcResL
{
[J("meth")] public string Meth { get; set; }
[J("err")] public string Err { get; set; }
[J("res")] public Res Res { get; set; }
}
public partial class Res
{
[J("common")] public Common Common { get; set; }
[J("type")] public string Type { get; set; }
[J("jnyL")] public List<JnyL> JnyL { get; set; }
[J("fpB")] public string FpB { get; set; }
[J("fpE")] public string FpE { get; set; }
[J("planrtTS")] public string PlanrtTs { get; set; }
[J("sD")] public string SD { get; set; }
[J("sT")] public string ST { get; set; }
[J("locRefL")] public List<long> LocRefL { get; set; }
}
public partial class Common
{
[J("locL")] public List<LocL> LocL { get; set; }
[J("prodL")] public List<CommonProdL> ProdL { get; set; }
[J("polyL")] public List<object> PolyL { get; set; }
[J("layerL")] public List<LayerL> LayerL { get; set; }
[J("crdSysL")] public List<CrdSysL> CrdSysL { get; set; }
[J("opL")] public List<OpL> OpL { get; set; }
[J("remL")] public List<RemL> RemL { get; set; }
[J("txtInstL")] public List<object> TxtInstL { get; set; }
[J("icoL")] public List<IcoL> IcoL { get; set; }
}
public partial class CrdSysL
{
[J("id")] public string Id { get; set; }
[J("index")] public long Index { get; set; }
[J("type")] public string Type { get; set; }
}
public partial class IcoL
{
[J("res", NullValueHandling = N.Ignore)] public string Res { get; set; }
[J("txtS", NullValueHandling = N.Ignore)] public string TxtS { get; set; }
[J("fg", NullValueHandling = N.Ignore)] public Bg Fg { get; set; }
[J("bg", NullValueHandling = N.Ignore)] public Bg Bg { get; set; }
[J("txt", NullValueHandling = N.Ignore)] public string Txt { get; set; }
}
public partial class Bg
{
[J("r")] public long R { get; set; }
[J("g")] public long G { get; set; }
[J("b")] public long B { get; set; }
}
public partial class LayerL
{
[J("id")] public string Id { get; set; }
[J("name")] public string Name { get; set; }
[J("index")] public long Index { get; set; }
[J("annoCnt")] public long AnnoCnt { get; set; }
}
public partial class LocL
{
[J("lid")] public string Lid { get; set; }
[J("type")] public string Type { get; set; }
[J("name")] public string Name { get; set; }
[J("nameFormatted")] public NameFormatted NameFormatted { get; set; }
[J("icoX")] public long IcoX { get; set; }
[J("extId")] public string ExtId { get; set; }
[J("state")] public string State { get; set; }
[J("crd")] public Crd Crd { get; set; }
[J("pCls")] public long PCls { get; set; }
[J("pRefL", NullValueHandling = N.Ignore)] public List<long> PRefL { get; set; }
[J("entry", NullValueHandling = N.Ignore)] public bool? Entry { get; set; }
[J("mMastLocX", NullValueHandling = N.Ignore)] public long? MMastLocX { get; set; }
[J("meta", NullValueHandling = N.Ignore)] public bool? Meta { get; set; }
[J("isMainMast", NullValueHandling = N.Ignore)] public bool? IsMainMast { get; set; }
}
public partial class Crd
{
[J("x")] public long X { get; set; }
[J("y")] public long Y { get; set; }
[J("layerX")] public long LayerX { get; set; }
[J("crdSysX")] public long CrdSysX { get; set; }
}
public partial class NameFormatted
{
[J("text")] public string Text { get; set; }
[J("textInstructionIntervalL")] public List<object> TextInstructionIntervalL { get; set; }
}
public partial class OpL
{
[J("name")] public string Name { get; set; }
[J("icoX")] public long IcoX { get; set; }
[J("street")] public string Street { get; set; }
[J("id")] public string Id { get; set; }
}
public partial class CommonProdL
{
[J("pid", NullValueHandling = N.Ignore)] public string Pid { get; set; }
[J("name")] public string Name { get; set; }
[J("nameS")] public string NameS { get; set; }
[J("number", NullValueHandling = N.Ignore)] public string Number { get; set; }
[J("icoX")] public long IcoX { get; set; }
[J("cls")] public long Cls { get; set; }
[J("oprX", NullValueHandling = N.Ignore)] public long? OprX { get; set; }
[J("prodCtx")] public ProdCtx ProdCtx { get; set; }
[J("himIdL", NullValueHandling = N.Ignore)] public List<string> HimIdL { get; set; }
}
public partial class ProdCtx
{
[J("name")] public string Name { get; set; }
[J("num", NullValueHandling = N.Ignore)] public string Num { get; set; }
[J("line")] public string Line { get; set; }
[J("lineId")] public string LineId { get; set; }
[J("matchId", NullValueHandling = N.Ignore)] public string MatchId { get; set; }
[J("catOutS")] public string CatOutS { get; set; }
[J("catOutL")] public string CatOutL { get; set; }
[J("catIn", NullValueHandling = N.Ignore)] public string CatIn { get; set; }
[J("catCode", NullValueHandling = N.Ignore)] public string CatCode { get; set; }
[J("admin", NullValueHandling = N.Ignore)] public string Admin { get; set; }
[J("catOut", NullValueHandling = N.Ignore)] public string CatOut { get; set; }
}
public partial class RemL
{
[J("type")] public string Type { get; set; }
[J("code")] public string Code { get; set; }
[J("prio", NullValueHandling = N.Ignore)] public long? Prio { get; set; }
[J("icoX")] public long IcoX { get; set; }
[J("txtN")] public string TxtN { get; set; }
}
public partial class JnyL
{
[J("jid")] public string Jid { get; set; }
[J("date")] public string Date { get; set; }
[J("prodX")] public long ProdX { get; set; }
[J("dirTxt")] public string DirTxt { get; set; }
[J("dirFlg")] public string DirFlg { get; set; }
[J("status")] public string Status { get; set; }
[J("isRchbl")] public bool IsRchbl { get; set; }
[J("stbStop")] public StbStop StbStop { get; set; }
[J("stopL")] public List<StopL> StopL { get; set; }
[J("msgL")] public List<JnyLMsgL> MsgL { get; set; }
[J("subscr")] public string Subscr { get; set; }
[J("prodL")] public List<JnyLProdL> ProdL { get; set; }
}
public partial class JnyLMsgL
{
[J("type")] public string Type { get; set; }
[J("remX")] public long RemX { get; set; }
[J("fLocX")] public long FLocX { get; set; }
[J("tLocX")] public long TLocX { get; set; }
[J("tagL")] public List<string> TagL { get; set; }
}
public partial class JnyLProdL
{
[J("prodX")] public long ProdX { get; set; }
[J("fLocX")] public long FLocX { get; set; }
[J("tLocX")] public long TLocX { get; set; }
[J("fIdx")] public long FIdx { get; set; }
[J("tIdx")] public long TIdx { get; set; }
}
public partial class StbStop
{
[J("locX")] public long LocX { get; set; }
[J("idx")] public long Idx { get; set; }
[J("dProdX")] public long DProdX { get; set; }
[J("dPlatfS")] public string DPlatfS { get; set; }
[J("dInR")] public bool DInR { get; set; }
[J("dTimeS")] public string DTimeS { get; set; }
[J("dTimeR")] public string DTimeR { get; set; }
[J("dProgType")] public string DProgType { get; set; }
[J("type")] public string Type { get; set; }
}
public partial class StopL
{
[J("locX")] public long LocX { get; set; }
[J("idx")] public long Idx { get; set; }
[J("dPlatfS", NullValueHandling = N.Ignore)] public string DPlatfS { get; set; }
[J("dInR", NullValueHandling = N.Ignore)] public bool? DInR { get; set; }
[J("dTimeS", NullValueHandling = N.Ignore)] public string DTimeS { get; set; }
[J("dTimeR", NullValueHandling = N.Ignore)] public string DTimeR { get; set; }
[J("dProgType", NullValueHandling = N.Ignore)] public string DProgType { get; set; }
[J("type")] public string Type { get; set; }
[J("aOutR", NullValueHandling = N.Ignore)] public bool? AOutR { get; set; }
[J("aTimeS", NullValueHandling = N.Ignore)] public string ATimeS { get; set; }
[J("isImp", NullValueHandling = N.Ignore)] public bool? IsImp { get; set; }
[J("aOutS", NullValueHandling = N.Ignore)] public bool? AOutS { get; set; }
[J("aCncl", NullValueHandling = N.Ignore)] public bool? ACncl { get; set; }
[J("msgL", NullValueHandling = N.Ignore)] public List<StopLMsgL> MsgL { get; set; }
[J("aTimeSCh", NullValueHandling = N.Ignore)] public bool? ATimeSCh { get; set; }
}
public partial class StopLMsgL
{
[J("type")] public string Type { get; set; }
[J("remX")] public long RemX { get; set; }
[J("tagL")] public List<string> TagL { get; set; }
[J("persist")] public bool Persist { get; set; }
}
public partial class HafasDepartureRawResponse
{
public static HafasDepartureRawResponse FromJson(string json) => JsonConvert.DeserializeObject<HafasDepartureRawResponse>(json, ZTravel.API.HAFAS.Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this HafasDepartureRawResponse self) => JsonConvert.SerializeObject(self, ZTravel.API.HAFAS.Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters =
{
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
},
};
}
}