// 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; INFORMATION_OUTAGE = 2; STATION_NOTICE = 3; SPECIAL_NOTICE = 4; WEEKDAY_SCHEDULE = 5; WEEKEND_SCHEDULE = 6; SATURDAY_SCHEDULE = 7; SUNDAY_SCHEDULE = 8; EXTRA_SERVICE = 9; BOARDING_CHANGE = 10; SPECIAL_SCHEDULE = 11; EXPECT_DELAYS = 12; REDUCED_SERVICE = 13; PLANNED_EXPRESS_TO_LOCAL = 14; PLANNED_EXTRA_TRANSFER = 15; PLANNED_STOPS_SKIPPED = 16; PLANNED_DETOUR = 17; PLANNED_REROUTE = 18; PLANNED_SUBSTITUTE_BUSES = 19; PLANNED_PART_SUSPENDED = 20; PLANNED_SUSPENDED = 21; SOME_DELAYS = 22; EXPRESS_TO_LOCAL = 23; DELAYS = 24; CANCELLATIONS = 25; DELAYS_AND_CANCELLATIONS = 26; STOPS_SKIPPED = 27; SEVERE_DELAYS = 28; DETOUR = 29; REROUTE = 30; SUBSTITUTE_BUSES = 31; PART_SUSPENDED = 32; SUSPENDED = 33; } // 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; }