// Copyright 2020 Metropolitan Transportation Authority // // Mercury extensions for the GTFS-realtime protocol. // syntax = "proto2"; import "com/google/transit/realtime/gtfs-realtime.proto"; option java_package = "com.google.transit.realtime"; package transit_realtime; // Mercury extensions for the Feed Header message MercuryFeedHeader { // Version of the Mercury extensions // The current version is 1.0 required string mercury_version = 1; } extend transit_realtime.FeedHeader { optional MercuryFeedHeader mercury_feed_header = 1001; } message MercuryStationAlternative { required EntitySelector affected_entity = 1; required TranslatedString notes = 2; } // Mercury extensions for the Feed Alert message MercuryAlert { required uint64 created_at = 1; required uint64 updated_at = 2; required string alert_type = 3; repeated MercuryStationAlternative station_alternative = 4; repeated string service_plan_number = 5; repeated string general_order_number = 6; // A time interval, in seconds, indicating how long before each active period // consumers should display this alert. A value of 3600 here, for example, // suggests that this alert should be displayed 1 hour before each active // period. Consumers may choose to ignore this recommendation and display (or // not display) alerts based on their own logic if they so choose. optional uint64 display_before_active = 7; // A human-friendly string that summarizes all active periods for this Alert, // i.e. "Sundays in May from 10:45pm to midnight" optional TranslatedString human_readable_active_period = 8; optional uint64 directionality = 9; repeated EntitySelector affected_stations = 10; optional TranslatedString screens_summary = 11; optional bool no_affected_stations = 12; // The ids of the planned work cloned from optional string clone_id = 13; } extend transit_realtime.Alert { optional MercuryAlert mercury_alert = 1001; } // Mercury extensions for the Feed Entity Selector message MercuryEntitySelector { // What is the priority of the affected entity. Use to construct the entity sort_order. enum Priority { PRIORITY_NO_SCHEDULED_SERVICE = 1; PRIORITY_INFORMATION_OUTAGE = 2; PRIORITY_STATION_NOTICE = 3; PRIORITY_SPECIAL_NOTICE = 4; PRIORITY_WEEKDAY_SCHEDULE = 5; PRIORITY_WEEKEND_SCHEDULE = 6; PRIORITY_SATURDAY_SCHEDULE = 7; PRIORITY_SUNDAY_SCHEDULE = 8; PRIORITY_EXTRA_SERVICE = 9; PRIORITY_BOARDING_CHANGE = 10; PRIORITY_SPECIAL_SCHEDULE = 11; PRIORITY_EXPECT_DELAYS = 12; PRIORITY_REDUCED_SERVICE = 13; PRIORITY_PLANNED_EXPRESS_TO_LOCAL = 14; PRIORITY_PLANNED_EXTRA_TRANSFER = 15; PRIORITY_PLANNED_STOPS_SKIPPED = 16; PRIORITY_PLANNED_DETOUR = 17; PRIORITY_PLANNED_REROUTE = 18; PRIORITY_PLANNED_SUBSTITUTE_BUSES = 19; PRIORITY_PLANNED_PART_SUSPENDED = 20; PRIORITY_PLANNED_SUSPENDED = 21; PRIORITY_SERVICE_CHANGE = 22; PRIORITY_PLANNED_WORK = 23; PRIORITY_SOME_DELAYS = 24; PRIORITY_EXPRESS_TO_LOCAL = 25; PRIORITY_DELAYS = 26; PRIORITY_CANCELLATIONS = 27; PRIORITY_DELAYS_AND_CANCELLATIONS = 28; PRIORITY_STOPS_SKIPPED = 29; PRIORITY_SEVERE_DELAYS = 30; PRIORITY_DETOUR = 31; PRIORITY_REROUTE = 32; PRIORITY_SUBSTITUTE_BUSES = 33; PRIORITY_PART_SUSPENDED = 34; PRIORITY_SUSPENDED = 35; } // Format for sort_order is 'GTFS-ID:Priority', e.g. 'MTASBWY:G:16' required string sort_order = 1; } extend transit_realtime.EntitySelector { optional MercuryEntitySelector mercury_entity_selector = 1001; }