84 lines
3 KiB
C#
84 lines
3 KiB
C#
// <auto-generated />
|
|
//
|
|
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
|
|
//
|
|
// using ZTravel.API.DBF;
|
|
//
|
|
// var dbfResponse = DbfResponse.FromJson(jsonString);
|
|
|
|
namespace ZTravel.API.DBF
|
|
{
|
|
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 DbfResponse
|
|
{
|
|
[J("departures")] public List<Departure> Departures { get; set; }
|
|
}
|
|
|
|
public partial class Departure
|
|
{
|
|
[J("delayArrival")] public int? DelayArrival { get; set; }
|
|
[J("delayDeparture")] public int? DelayDeparture { get; set; }
|
|
[J("destination")] public string Destination { get; set; }
|
|
[J("isCancelled")] public long IsCancelled { get; set; }
|
|
[J("messages")] public Messages Messages { get; set; }
|
|
[J("platform")] public string Platform { get; set; }
|
|
[J("route")] public List<Route> Route { get; set; }
|
|
[J("scheduledArrival")] public string ScheduledArrival { get; set; }
|
|
[J("scheduledDeparture")] public string ScheduledDeparture { get; set; }
|
|
[J("scheduledPlatform")] public string ScheduledPlatform { get; set; }
|
|
[J("train")] public string Train { get; set; }
|
|
[J("trainClasses")] public List<string> TrainClasses { get; set; }
|
|
[J("trainNumber")] public string TrainNumber { get; set; }
|
|
[J("via")] public List<string> Via { get; set; }
|
|
}
|
|
|
|
public partial class Messages
|
|
{
|
|
[J("delay")] public List<Delay> Delay { get; set; }
|
|
[J("qos")] public List<Delay> Qos { get; set; }
|
|
}
|
|
|
|
public partial class Delay
|
|
{
|
|
[J("text")] public string Text { get; set; }
|
|
[J("timestamp")] public string Timestamp { get; set; }
|
|
}
|
|
|
|
public partial class Route
|
|
{
|
|
[J("name")] public string Name { get; set; }
|
|
}
|
|
|
|
public partial class DbfResponse
|
|
{
|
|
public static DbfResponse FromJson(string json) => JsonConvert.DeserializeObject<DbfResponse>(json, ZTravel.API.DBF.Converter.Settings);
|
|
}
|
|
|
|
public static partial class Serialize
|
|
{
|
|
public static string ToJson(this DbfResponse self) => JsonConvert.SerializeObject(self, ZTravel.API.DBF.Converter.Settings);
|
|
}
|
|
|
|
internal static partial class Converter
|
|
{
|
|
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
|
|
{
|
|
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
|
|
DateParseHandling = DateParseHandling.None,
|
|
Converters =
|
|
{
|
|
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
|
},
|
|
};
|
|
}
|
|
}
|