Last active
December 6, 2018 14:54
-
-
Save stuartbreckenridge/ff54312bf9f3a2f668e25141b82c3b4c to your computer and use it in GitHub Desktop.
TfL StopPoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public typealias TfLStopPoint = [TfLStopPointElement] | |
public class TfLStopPointElement: Codable { | |
public let naptanId: String? | |
public let platformName: String? | |
public let indicator: String? | |
public let stopLetter: String? | |
public let modes: [String]? | |
public let icsCode: String? | |
public let smsCode: String? | |
public let stopType: String? | |
public let stationNaptan: String? | |
public let accessibilitySummary: String? | |
public let hubNaptanCode: String? | |
public let lines: [Line]? | |
public let lineGroup: [LineGroup]? | |
public let lineModeGroups: [LineModeGroup]? | |
public let fullName: String? | |
public let naptanMode: String? | |
public let status: Bool? | |
public let id: String? | |
public let url: String? | |
public let commonName: String? | |
public let distance: Int32? | |
public let placeType: String? | |
public let additionalProperties: [AdditionalProperty]? | |
public let children: [TfLStopPointElement]? | |
public let childrenUrls: [String]? | |
public let lat: Double? | |
public let lon: Double? | |
enum CodingKeys: String, CodingKey { | |
case naptanId = "naptanId" | |
case platformName = "platformName" | |
case indicator = "indicator" | |
case stopLetter = "stopLetter" | |
case modes = "modes" | |
case icsCode = "icsCode" | |
case smsCode = "smsCode" | |
case stopType = "stopType" | |
case stationNaptan = "stationNaptan" | |
case accessibilitySummary = "accessibilitySummary" | |
case hubNaptanCode = "hubNaptanCode" | |
case lines = "lines" | |
case lineGroup = "lineGroup" | |
case lineModeGroups = "lineModeGroups" | |
case fullName = "fullName" | |
case naptanMode = "naptanMode" | |
case status = "status" | |
case id = "id" | |
case url = "url" | |
case commonName = "commonName" | |
case distance = "distance" | |
case placeType = "placeType" | |
case additionalProperties = "additionalProperties" | |
case children = "children" | |
case childrenUrls = "childrenUrls" | |
case lat = "lat" | |
case lon = "lon" | |
} | |
public init(naptanId: String?, platformName: String?, indicator: String?, stopLetter: String?, modes: [String]?, icsCode: String?, smsCode: String?, stopType: String?, stationNaptan: String?, accessibilitySummary: String?, hubNaptanCode: String?, lines: [Line]?, lineGroup: [LineGroup]?, lineModeGroups: [LineModeGroup]?, fullName: String?, naptanMode: String?, status: Bool?, id: String?, url: String?, commonName: String?, distance: Int32?, placeType: String?, additionalProperties: [AdditionalProperty]?, children: [TfLStopPointElement]?, childrenUrls: [String]?, lat: Double?, lon: Double?) { | |
self.naptanId = naptanId | |
self.platformName = platformName | |
self.indicator = indicator | |
self.stopLetter = stopLetter | |
self.modes = modes | |
self.icsCode = icsCode | |
self.smsCode = smsCode | |
self.stopType = stopType | |
self.stationNaptan = stationNaptan | |
self.accessibilitySummary = accessibilitySummary | |
self.hubNaptanCode = hubNaptanCode | |
self.lines = lines | |
self.lineGroup = lineGroup | |
self.lineModeGroups = lineModeGroups | |
self.fullName = fullName | |
self.naptanMode = naptanMode | |
self.status = status | |
self.id = id | |
self.url = url | |
self.commonName = commonName | |
self.distance = distance | |
self.placeType = placeType | |
self.additionalProperties = additionalProperties | |
self.children = children | |
self.childrenUrls = childrenUrls | |
self.lat = lat | |
self.lon = lon | |
} | |
} | |
public class AdditionalProperty: Codable { | |
public let category: String? | |
public let key: String? | |
public let sourceSystemKey: String? | |
public let value: String? | |
public let modified: String? | |
enum CodingKeys: String, CodingKey { | |
case category = "category" | |
case key = "key" | |
case sourceSystemKey = "sourceSystemKey" | |
case value = "value" | |
case modified = "modified" | |
} | |
public init(category: String?, key: String?, sourceSystemKey: String?, value: String?, modified: String?) { | |
self.category = category | |
self.key = key | |
self.sourceSystemKey = sourceSystemKey | |
self.value = value | |
self.modified = modified | |
} | |
} | |
public class TfLStopPointChild: Codable { | |
public let id: String? | |
public let url: String? | |
public let commonName: String? | |
public let distance: Int? | |
public let placeType: String? | |
public let additionalProperties: [AdditionalProperty]? | |
public let children: [ChildChild]? | |
public let childrenUrls: [String]? | |
public let lat: Double? | |
public let lon: Double? | |
enum CodingKeys: String, CodingKey { | |
case id = "id" | |
case url = "url" | |
case commonName = "commonName" | |
case distance = "distance" | |
case placeType = "placeType" | |
case additionalProperties = "additionalProperties" | |
case children = "children" | |
case childrenUrls = "childrenUrls" | |
case lat = "lat" | |
case lon = "lon" | |
} | |
public init(id: String?, url: String?, commonName: String?, distance: Int?, placeType: String?, additionalProperties: [AdditionalProperty]?, children: [ChildChild]?, childrenUrls: [String]?, lat: Double?, lon: Double?) { | |
self.id = id | |
self.url = url | |
self.commonName = commonName | |
self.distance = distance | |
self.placeType = placeType | |
self.additionalProperties = additionalProperties | |
self.children = children | |
self.childrenUrls = childrenUrls | |
self.lat = lat | |
self.lon = lon | |
} | |
} | |
public class ChildChild: Codable { | |
public init() { | |
} | |
} | |
public class LineGroup: Codable { | |
public let naptanIdReference: String? | |
public let stationAtcoCode: String? | |
public let lineIdentifier: [String]? | |
enum CodingKeys: String, CodingKey { | |
case naptanIdReference = "naptanIdReference" | |
case stationAtcoCode = "stationAtcoCode" | |
case lineIdentifier = "lineIdentifier" | |
} | |
public init(naptanIdReference: String?, stationAtcoCode: String?, lineIdentifier: [String]?) { | |
self.naptanIdReference = naptanIdReference | |
self.stationAtcoCode = stationAtcoCode | |
self.lineIdentifier = lineIdentifier | |
} | |
} | |
public class LineModeGroup: Codable { | |
public let modeName: String? | |
public let lineIdentifier: [String]? | |
enum CodingKeys: String, CodingKey { | |
case modeName = "modeName" | |
case lineIdentifier = "lineIdentifier" | |
} | |
public init(modeName: String?, lineIdentifier: [String]?) { | |
self.modeName = modeName | |
self.lineIdentifier = lineIdentifier | |
} | |
} | |
public class Line: Codable { | |
public let id: String? | |
public let name: String? | |
public let uri: String? | |
public let fullName: String? | |
public let type: String? | |
public let crowding: Crowding? | |
public let routeType: String? | |
public let status: String? | |
enum CodingKeys: String, CodingKey { | |
case id = "id" | |
case name = "name" | |
case uri = "uri" | |
case fullName = "fullName" | |
case type = "type" | |
case crowding = "crowding" | |
case routeType = "routeType" | |
case status = "status" | |
} | |
public init(id: String?, name: String?, uri: String?, fullName: String?, type: String?, crowding: Crowding?, routeType: String?, status: String?) { | |
self.id = id | |
self.name = name | |
self.uri = uri | |
self.fullName = fullName | |
self.type = type | |
self.crowding = crowding | |
self.routeType = routeType | |
self.status = status | |
} | |
} | |
public class Crowding: Codable { | |
public let passengerFlows: [PassengerFlow]? | |
public let trainLoadings: [TrainLoading]? | |
enum CodingKeys: String, CodingKey { | |
case passengerFlows = "passengerFlows" | |
case trainLoadings = "trainLoadings" | |
} | |
public init(passengerFlows: [PassengerFlow]?, trainLoadings: [TrainLoading]?) { | |
self.passengerFlows = passengerFlows | |
self.trainLoadings = trainLoadings | |
} | |
} | |
public class PassengerFlow: Codable { | |
public let timeSlice: String? | |
public let value: Int? | |
enum CodingKeys: String, CodingKey { | |
case timeSlice = "timeSlice" | |
case value = "value" | |
} | |
public init(timeSlice: String?, value: Int?) { | |
self.timeSlice = timeSlice | |
self.value = value | |
} | |
} | |
public class TrainLoading: Codable { | |
public let line: String? | |
public let lineDirection: String? | |
public let platformDirection: String? | |
public let direction: String? | |
public let naptanTo: String? | |
public let timeSlice: String? | |
public let value: Int? | |
enum CodingKeys: String, CodingKey { | |
case line = "line" | |
case lineDirection = "lineDirection" | |
case platformDirection = "platformDirection" | |
case direction = "direction" | |
case naptanTo = "naptanTo" | |
case timeSlice = "timeSlice" | |
case value = "value" | |
} | |
public init(line: String?, lineDirection: String?, platformDirection: String?, direction: String?, naptanTo: String?, timeSlice: String?, value: Int?) { | |
self.line = line | |
self.lineDirection = lineDirection | |
self.platformDirection = platformDirection | |
self.direction = direction | |
self.naptanTo = naptanTo | |
self.timeSlice = timeSlice | |
self.value = value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment