go-types/pkg/upstreamApi/vstp.go

69 lines
3.1 KiB
Go
Raw Normal View History

2023-07-18 12:39:36 +01:00
package upstreamApi
2023-07-20 21:15:51 +01:00
type MsgData struct {
Data VstpMsg `json:"VSTPCIFMsgV1,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
2023-07-20 21:15:51 +01:00
}
2023-07-20 10:55:55 +01:00
type VstpMsg struct {
2024-04-24 22:11:22 +01:00
CIFMsg VSTPSchedule `json:"schedule,omitempty"`
2023-07-20 10:55:55 +01:00
}
2024-04-24 22:11:22 +01:00
// VSTP Version of the JsonScheduleV1 type
type VSTPSchedule struct {
TransactionType string `json:"transaction_type"`
CifBankHolidayRunning string `json:"CIF_bank_holiday_running"`
CifStpIndicator string `json:"CIF_stp_indicator"`
CifTrainUid string `json:"CIF_train_uid"`
ApplicableTimetable string `json:"applicable_timetable"`
ScheduleDaysRun string `json:"schedule_days_runs"`
ScheduleStartDate string `json:"schedule_start_date"`
ScheduleEndDate string `json:"schedule_end_date"`
ScheduleSegment []VSTPScheduleSegment `json:"schedule_segment"`
2023-07-18 12:39:36 +01:00
}
2024-04-24 22:59:56 +01:00
// Part of the VSTPSchedule type - Not used keys commented out
2024-04-24 22:11:22 +01:00
type VSTPScheduleSegment struct {
2024-04-24 22:59:56 +01:00
SignallingId string `json:"signalling_id"`
2024-04-24 23:16:31 +01:00
AtocCode string `json:"atoc_code"`
2024-04-24 22:59:56 +01:00
CifTrainCategory string `json:"CIF_train_category"`
CifHeadcode string `json:"CIF_headcode"`
// CifCourseIndicator int64 `json:"CIF_course_indicator"`
CifTrainServiceCode string `json:"CIF_train_service_code"`
CifBusinessSector string `json:"CIF_business_sector"`
CifPowerType string `json:"CIF_power_type"`
CifTimingLoad string `json:"CIF_timing_load"`
CifSpeed string `json:"CIF_speed"`
CifOperatingCharacteristics string `json:"CIF_operating_characteristics"`
CifTrainClass string `json:"CIF_train_class"`
CifSleepers string `json:"CIF_sleepers"`
CifReservations string `json:"CIF_reservations"`
// CifConnectionIndicator string `json:"CIF_connection_indicator"`
CifCateringCode string `json:"CIF_catering_code"`
CifServiceBranding string `json:"CIF_service_branding"`
ScheduleLocation []VSTPScheduleLocation `json:"schedule_location"`
2023-07-18 12:39:36 +01:00
}
2024-04-24 22:11:22 +01:00
// Part of the VSTPScheduleSegment type
type VSTPScheduleLocation struct {
Arrival string `json:"scheduled_arrival_time"`
PublicArrival string `json:"public_arrival_time"`
Departure string `json:"scheduled_departure_time"`
PublicDeparture string `json:"public_departure_time"`
Pass string `json:"scheduled_pass_time"`
Path string `json:"CIF_path"`
Platform string `json:"CIF_platform"`
Line string `json:"CIF_line"`
EngineeringAllowance string `json:"CIF_engineering_allowance"`
PathingAllowance string `json:"CIF_pathing_allowance"`
PerformanceAllowance string `json:"CIF_performance_allowance"`
Location LocationTiploc `json:"location"`
}
2024-04-24 22:11:22 +01:00
// Part of the VSTPScheduleLocaiton type
type LocationTiploc struct {
Tiploc struct {
2023-07-20 21:21:12 +01:00
TiplocId string `json:"tiploc_id,omitempty"`
} `json:"tiploc,omitempty"`
2023-07-19 20:27:27 +01:00
}